Comments (6)
I added optional param and tool started to be executed. You might have been right with the first bug reference in your message.
Funnily enough before with gpt-4o when tool had been executed there was no generation running. Now I have both an answer from the text stream and also a tool execution
from ai.
yeah, before I switched from gpt-4o it was exactly the behaviour that you described @anikiyevichm(the correct one with no text generation called at all)
Again it would be super handy to see what's going on behind the scenes in tool calling and get some debug logs to make it more prominent!
from ai.
Strange! it should work, can you check this demo: https://github.com/vercel/ai/blob/main/examples/ai-core/src/generate-text/anthropic-chatbot-with-tools.ts
However, there is a bug for anthropic around empty parameters: #2103 (potential duplicate)
from ai.
Don't think it's the same as in #2103 as I don't have any errors in console, I get response from the basic streamText
instead of going a tool route. I saw an issue about debugging tool calls #2102, maybe an improvement in this area would help to at least see what is going on.
I will try to experiment with it a bit and get back to you if I find out anything new. Thanks for fast response and confirming that it should work!
from ai.
@d-ivashchuk oh - that means that the anthropic model did not call the tool as expected. This is typically a prompt engineering issue. Maybe changing "description" to some definition of when the model should call the tool might help?
from ai.
Funnily enough before with gpt-4o when tool had been executed there was no generation running. Now I have both an answer from the text stream and also a tool execution
i have the same picture, but it's look like a bug for me. the done
field does not appear in text generation, but the expected tool is called instead. So i see unfinished text generation process and tool calling after.
expected behavior is that text generation will not be called at all
from ai.
Related Issues (20)
- Anthropic user content inside tool result HOT 9
- Bedrock Provider using profile HOT 11
- Provider registry doesn't work with model IDs that have a colon HOT 3
- [perplexity] streamObject fails HOT 7
- Feature parity for `useChat` SolidJS
- Please export the type for onFinish callback on streamText HOT 1
- AWS Bedrock Agent Provider HOT 1
- Add `isLoading` and `stop` functionality to `useObject` hook HOT 3
- If the request fails, the previous message is not restored HOT 3
- Support streaming tools in streamText, streamUI
- Tool calling visibility HOT 2
- Incorrect `args` format in `tool-call` messages when calling functions with no parameters HOT 5
- Azure Provider: add api version parameter HOT 2
- `streamObject` with `@ai-sdk/anthropic` only provides a full object once finished via `.toTextStreamResponse()` HOT 5
- useObject hook's isLoading and stop functionality not working as expected during streaming HOT 2
- useObject hook's isLoading remains true after stopping the stream HOT 2
- UI Update Failure in Production with AI SDK 3.2.14 on Vercel Edge Runtime HOT 6
- Allow showing a spinner while client-side tools are running
- Responses not adhering to Zod schema with OpenAI models HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai.