mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-18 15:49:15 +03:00
This can only be reviewed by [hiding whitespaces](https://github.com/langchain-ai/langchain/pull/30302/files?diff=unified&w=1). The motivation behind this PR is to get my hands on the docs and make the LangSmith teasing short and clear. Right now I don't know how to do it, but this could be an include in the future. --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
5.4 KiB
5.4 KiB
Cell:
[Cell type raw - unsupported, skipped]
In [ ]:
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
# os.environ["LANGSMITH_TRACING"] = "true"In [ ]:
%pip install -qU __package_name__In [ ]:
from __module_name__ import __ModuleName__Toolkit
toolkit = __ModuleName__Toolkit(
# ...
)In [ ]:
toolkit.get_tools()In [ ]:
from langgraph.prebuilt import create_react_agent
agent_executor = create_react_agent(llm, tools)In [ ]:
example_query = "..."
events = agent_executor.stream(
{"messages": [("user", example_query)]},
stream_mode="values",
)
for event in events:
event["messages"][-1].pretty_print()