You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when using the useChat function along with @ai-sdk/anthropic in my project. The normal chat functionality seems to work without any problems. However, when attempting to use asynchronous tools within the chat, the message flow gets interrupted.
Chat error: Error
at processDataProtocolResponse (index.mjs:736:1)
at async callChatApi (index.mjs:1019:1)
at async getStreamedResponse (index.mjs:226:1)
at async processChatStream (index.mjs:1231:1)
at async eval (index.mjs:347:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
The text was updated successfully, but these errors were encountered:
Abdurihim
changed the title
@ai-sdk/anthropic "^0.0.54" - Chat Error Occurring While @ai-sdk/openai Works Fine
Message Interruption When Using useChat with @ai-sdk/anthropic and Asynchronous Tools, While Normal Chat Works Fine
Nov 15, 2024
Description
I'm encountering an issue when using the useChat function along with @ai-sdk/anthropic in my project. The normal chat functionality seems to work without any problems. However, when attempting to use asynchronous tools within the chat, the message flow gets interrupted.
Code example
`
} = useChat({
api: "/api/chat",
body: {
customData: {
developmentEnv: envSelection.developmentEnv,
selectedStack: envSelection.selectedStack,
languageModel: envSelection.languageModel,
},
},
maxSteps: 100,
async onToolCall({ toolCall }) {
console.log("onToolCall", toolCall);
});
`
AI provider
@ai-sdk/anthropi ^0.0.54
Additional context
Chat error: Error
at processDataProtocolResponse (index.mjs:736:1)
at async callChatApi (index.mjs:1019:1)
at async getStreamedResponse (index.mjs:226:1)
at async processChatStream (index.mjs:1231:1)
at async eval (index.mjs:347:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
at async eval (index.mjs:398:1)
The text was updated successfully, but these errors were encountered: