-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use agents in langchain example #21
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The changes in the PR are clear and well explained. However, there are a couple of things that could be improved:
Here are the suggested changes: In JavaScript/langchain/README.md and Python/langchain/README.md: Replace: Go to the [explore page](https://app.autoblocks.ai/explore). When you find the trace, switch to the Trace Tree view to
see a tree of all the spans in the trace.
The first span that is selected will show you the overall question and answer of the LangChain pipeline, but you can also
drill into individual spans by clicking on them to understand how LangChain is working under the hood. With: Visit the [explore page](https://app.autoblocks.ai/explore) and switch to the Trace Tree view to see the trace. The first selected span shows the overall LangChain pipeline's question and answer. Click on individual spans for more details. And make sure the image links are correct: ![Trace Tree View](correct-path-to-image) Please replace
Here's a code suggestion for the "dependencies": {
"@autoblocks/client": "0.0.15",
"dotenv-cli": "7.3.0",
"langchain": "0.0.173"
} Remember to run
try {
const output = await executor.run(
"What is today's date? What is that date divided by 2?",
{ callbacks: [handler] }
);
console.log(`Output: ${output}`);
} catch (error) {
console.error(`Error executing the model: ${error}`);
}
const QUERY = "What is today's date? What is that date divided by 2?";
...
const output = await executor.run(QUERY, { callbacks: [handler] });
@tool
def todays_date(*args, **kwargs) -> str:
"""Returns today's date"""
return datetime.now().strftime('%Y-%m-%d')
agent = initialize_agent(
tools=tools,
llm=llm,
agent_type=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
)
output1 = agent.run("What is today's date?", callbacks=[handler])
output2 = agent.run(f"What is {output1} divided by 2?", callbacks=[handler])
print(f"Output: {output}")
print()
print("View your trace: https://app.autoblocks.ai/explore") The changes in this PR seem to be mostly about updating package versions and adding a new package "numexpr". Here are a few suggestions:
Please consider these points before merging the PR. [tool.poetry.dependencies]
python = "^3.9"
autoblocksai = "^0.0.11"
langchain = "^0.0.323"
numexpr = "^2.8.7"
openai = "^0.28.1"
python-dotenv = "^1.0.0" Also, please ensure that the new version of |
No description provided.