ๆญฃๅœจๅŠ ่ฝฝ่ง†้ข‘...

่ง†้ข‘ๅŠ ่ฝฝๅคฑ่ดฅ

"Vercel AI SDK - how do I get ai to interpret the tools response?" ๐Ÿ‘‡

18,731 ๆฌก่ง‚็œ‹ โ€ข 1 ๅนดๅ‰ โ€ขvia X (Twitter)

7 ๆก่ฏ„่ฎบ

Kevin Wolf ็š„ๅคดๅƒ
Kevin Wolf1 ๅนดๅ‰

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

Alex Sidorenko ็š„ๅคดๅƒ
Alex Sidorenko1 ๅนดๅ‰

Could lead to infinite loops according to the docs.

NICE ็š„ๅคดๅƒ
NICE1 ๅนดๅ‰

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

Eka Prasetia ๐Ÿคต ็š„ๅคดๅƒ
Eka Prasetia ๐Ÿคต1 ๅนดๅ‰

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

Alex Sidorenko ็š„ๅคดๅƒ
Alex Sidorenko1 ๅนดๅ‰

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

Tomas Jansson ็š„ๅคดๅƒ
Tomas Jansson1 ๅนดๅ‰

Why does it not work without maxSteps?

Alex Sidorenko ็š„ๅคดๅƒ
Alex Sidorenko1 ๅนดๅ‰

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

็›ธๅ…ณ่ง†้ข‘