Open mantrakp04 opened 1 month ago
From the stack trace it seems like it's not from the astream events API, but something in the chat anthropic implementation.
Would you mind checking what happens if you generate a list of BaseMessage that corresponds to the chat history you have and then invoke them with async for chunk in model.astream(messages)
and list(model.stream(messages))
.
I suspect it'll trigger the error as well and help produce a minimal reproducible example
chat anthropoic is weird I suspected that as well it returns a list of json as response and doesn’t run if I convert the json to a str and replace the message.content with that str
On Wed, Jul 10, 2024 at 3:00 AM Eugene Yurtsev @.***> wrote:
From the stack trace it seems like it's not from the astream events API, but something in the chat anthropic implementation.
Would you mind checking what happens if you generate a list of BaseMessage that corresponds to the chat history you have and then invoke them with async for chunk in model.astream(messages) and list(model.stream(messages)).
I suspect it'll trigger the error as well and help produce a minimal reproducible example
— Reply to this email directly, view it on GitHub https://github.com/langchain-ai/langchain/issues/24007#issuecomment-2218764472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY3AOKCW4GTA54VGNIJLJDZLRJARAVCNFSM6AAAAABKSGSBKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYG43DINBXGI . You are receiving this because you authored the thread.Message ID: @.***>
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
the above error occurs when I add FunctionMessage to chathistory, and run the agent again.
ex:
1st run) input: what is apple stock rn - runs perfectly 2nd run) input: what is google stock rn - gives the above error
System Info