Replies: 1 comment
-
@kihumban is your graph name “agent” in langgraph.json? it looks like a name mismatch |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I am getting the following error message invoke our graph with this code
`input = {"messages": [{"role": "user", "content": "what's the weather in atlanta"}]}
assistant_id = "agent"
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=input,
stream_mode="updates",
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")`
Error:
`---------------------------------------------------------------------------
HTTPStatusError Traceback (most recent call last)
Cell In[7], line 5
1 input = {"messages": [{"role": "user", "content": "what's the weather in atlanta"}]}
3 assistant_id = "agent"
----> 5 async for chunk in client.runs.stream(
6 thread["thread_id"],
7 assistant_id,
8 input=input,
9 stream_mode="updates",
10 ):
11 print(f"Receiving new event of type: {chunk.event}...")
12 print(chunk.data)
File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langgraph_sdk/client.py:295, in HttpClient.stream(self, path, method, json)
293 else:
294 logger.error(f"Error from langgraph-api: {body}", exc_info=e)
--> 295 raise e
296 async for event in sse.aiter_sse():
297 yield StreamPart(
298 event.event, orjson.loads(event.data) if event.data else None
299 )
File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langgraph_sdk/client.py:288, in HttpClient.stream(self, path, method, json)
284 async with httpx_sse.aconnect_sse(
285 self.client, method, path, headers=headers, content=content
286 ) as sse:
287 try:
--> 288 sse.response.raise_for_status()
289 except httpx.HTTPStatusError as e:
290 body = (await sse.response.aread()).decode()
File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/httpx/_models.py:761, in Response.raise_for_status(self)
759 error_type = error_types.get(status_class, "Invalid status code")
760 message = message.format(self, error_type=error_type)
--> 761 raise HTTPStatusError(message, request=request, response=self)
HTTPStatusError: Client error '422 Unprocessable Entity' for url 'http://localhost:8123/threads/cecf2e39-ccfa-44b5-817e-f1394a560b21/runs/stream'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
Invalid assistant ID`
I am using Chrome and not Mozilla
Beta Was this translation helpful? Give feedback.
All reactions