Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

"Vercel AI SDK - how do I get ai to interpret the tools response?" 👇

18,731 Aufrufe • vor 1 Jahr •via X (Twitter)

7 Kommentare

Profilbild von Kevin Wolf
Kevin Wolfvor 1 Jahr

I usually just set up maxSteps to be infinity. Is it a bad practice?

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

Could lead to infinite loops according to the docs.

Profilbild von NICE
NICEvor 1 Jahr

Stay competitive by balancing cutting-edge AI with automation tools. Forrester shows how.

Profilbild von Eka Prasetia 🤵
Eka Prasetia 🤵vor 1 Jahr

So, does it mean maxStep is required for Tool Calling?

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

Nope. If you just need the tool's call result (e.g., displaying the weather widget with data from the weather API), you can directly access it from message.toolInvocations (no need for maxSteps) It's when you need to feed the result of the tool invocation back to LLM for it to interpret and respond that's when you need maxStep

Profilbild von Tomas Jansson
Tomas Janssonvor 1 Jahr

Why does it not work without maxSteps?

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

It does work, the tool gets called, and you have access to its result in your UI. But if you want to feed the tool's invocation result back to llm to get natural language response, you need more steps

Ähnliche Videos