Agent Invoke method #1031
Unanswered
Harish-ilink
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@Harish-ilink what langgraph version are you using? this shouldn't be happening in the latest version |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@router.post("/invoke")
async def stream_run(
payload: CreateRunPayload, # for openapi docs
request: Request,
userid: OpengptsUserId,
tenantid: str = Header(None),
):
"""Create a invoke."""
input_request = payload.dict(exclude_unset=True)
input_, config = await _run_input_and_config(request, userid)
config = update_bitc_config(userid,tenantid,config)
return agent.invoke(input=input_request,config=config)
Im trying to call invoke method instead of streaming my bots response.But I was getting error .I have tried aiinvoke() method also.But Im ending up in same error.
File "/usr/local/lib/python3.11/site-packages/langgraph/channels/binop.py", line 58, in update
2024-07-16 10:55:18 self.value = self.operator(self.value, value)
2024-07-16 10:55:18 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-16 10:55:18 File "/usr/local/lib/python3.11/site-packages/langgraph/graph/message.py", line 22, in add_messages
2024-07-16 10:55:18 if m.id is None:
2024-07-16 10:55:18 ^^^^
2024-07-16 10:55:18 AttributeError: 'dict' object has no attribute 'id'
Beta Was this translation helpful? Give feedback.
All reactions