Coder Social home page Coder Social logo

Comments (6)

d-ivashchuk avatar d-ivashchuk commented on July 21, 2024 1

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.

d-ivashchuk avatar d-ivashchuk commented on July 21, 2024 1

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.

lgrammel avatar lgrammel commented on July 21, 2024

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.

d-ivashchuk avatar d-ivashchuk commented on July 21, 2024

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.

lgrammel avatar lgrammel commented on July 21, 2024

@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.

anikiyevichm avatar anikiyevichm commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.