I used the code in the LangChain official website tutorial, but got an error #28213
Unanswered
AChineseBoy
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@AChineseBoy The async for loop need to be inside a async function for example async def demo():
async for event in agent_executor.astream_events(
{"messages": [HumanMessage(content="whats the weather in sf?")]}, version="v1"
):
.... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I used the code in the LangChain official website tutorial, but got an error。
SyntaxError: 'async for' outside async function
System Info
Mac
python3.11.8
Beta Was this translation helpful? Give feedback.
All reactions