Multi-Step (Agentic) Generation with the AI SDK

  Рет қаралды 10,586

Vercel

Vercel

Күн бұрын

Пікірлер: 28
@digitalsahara6670
@digitalsahara6670 7 күн бұрын
I have a question in regards to the max steps. I have multiple functions, and some functions I want to run after one step, and some functions I want to run after two steps or three steps. How do I dynamically enable that? Is there a way of doing so? When I currently do a function call, it generates the generative UI and then the text as well, which I don't want to happen.
@kirso
@kirso 2 ай бұрын
A bit confused here and somebody already asked "so maxSteps should at least be equal to amount of tools you have + 1?" But isn't the problem statement here completion and extra call for the tool, instead of # of steps? What if I have another 15 steps calling different tools with the result?
@JakeHaugen
@JakeHaugen 3 ай бұрын
Why abstracted to max steps rather than just say “complete tool calls”? Are there any other things that would result in multiple calls?
@rogercgarcia
@rogercgarcia 3 ай бұрын
It seems they did it to “avoid infinite loops if misconfigured,” but effectively it does complete tool calls.
@nicoalbanese10
@nicoalbanese10 3 ай бұрын
​@@rogercgarcia this is exactly right!
@rogercgarcia
@rogercgarcia 3 ай бұрын
@@nicoalbanese10thanks for confirming! And the great video.
@jonathankurtis
@jonathankurtis 2 ай бұрын
@@nicoalbanese10 maxSteps seems very odd to me that it is global. i want to control the number of steps on a per tool basis. is there a workaround?
@nathanbrodin2948
@nathanbrodin2948 3 ай бұрын
Great video! Is the code editor used in the video VSCode ? How did you make it so minimal ? Because it looks so good
@alvarorc28
@alvarorc28 Ай бұрын
I think he is using Zed!
@hshioijp22
@hshioijp22 3 ай бұрын
Sorry for being specific, but if I understand it correctly, you want to start using maxSteps instead of maxToolRoundtrips? Because maxToolRoundtrips was being defined on the client side (which was bit weird now I think about).
@nicoalbanese10
@nicoalbanese10 3 ай бұрын
hey! we deprecated roundtrips in favor of steps as it was conceptually easier to understand. You can define maxSteps both on the client with useChat and on the server directly in streamText (as done in this video) 😊
@aleksd286
@aleksd286 3 ай бұрын
so maxSteps should at least be equal to amount of tools you have + 1?
@nicoalbanese10
@nicoalbanese10 3 ай бұрын
not necessarily! you want to use streamText + tools when you don't know what your user is going to do. Let's say you have 10 different tools, but for any given action, they may need to use 3 together. In that case, you would want to take the expected number of tools used for any given action + 1 (for the final summarization step).
@aleksd286
@aleksd286 3 ай бұрын
@@nicoalbanese10 how do i programatically know in advance how many tools would be used? does chatgpt in this context understand what it's possible to ask for additional data from one of these tools or it comes somewhere externally, eg. checkbox to use weather data?
@RAHUL-w8k8y
@RAHUL-w8k8y 2 ай бұрын
Hey please upload the videos of conference 2024
@nerd3131
@nerd3131 3 ай бұрын
I don't really understand what does it do. Probably my fault though.
@nicoalbanese10
@nicoalbanese10 3 ай бұрын
hey! the tldr is this feature sends any tool results back to the model to trigger another generation. Without this feature, you would have to manually check if a tool had been called and then send the results back. Was there anything in particular that you struggled with?
@nerd3131
@nerd3131 3 ай бұрын
@@nicoalbanese10 Oh, now that makes sense. Thanks a lot. TLDRs are life savers :)
@TheStallion1319
@TheStallion1319 3 ай бұрын
make a Vercel university
@PraiseYeezus
@PraiseYeezus 3 ай бұрын
Wait aren't you the Kiramase guy? Cool
@nicoalbanese10
@nicoalbanese10 3 ай бұрын
👋 haha yes I am!
@vinaymelavanki5814
@vinaymelavanki5814 3 ай бұрын
👌👏
@rishiraj2548
@rishiraj2548 3 ай бұрын
🙂👍🏻
@evereye_el
@evereye_el 3 ай бұрын
1st!
@lu2000luk
@lu2000luk 3 ай бұрын
too broke to use AI... The SDK seems well made tho
@lu2000luk
@lu2000luk 3 ай бұрын
like any other Vercel product tho
@PraiseYeezus
@PraiseYeezus 3 ай бұрын
@@lu2000luk it's not a 'product' that you buy, and there's also LLMs that cost pennies for hundreds of pages worth of output
@mallickpriyanshu
@mallickpriyanshu 3 ай бұрын
Well you can try Gemini... It's free for development
Hands on with the Vercel AI SDK 3.1
13:04
Vercel
Рет қаралды 40 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,4 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
Build anything with v0 (3D games, interactive apps)
9:05
Vercel
Рет қаралды 142 М.
How to Build Effective AI Agents (without the hype)
24:27
Dave Ebbelaar
Рет қаралды 4,8 М.
But what is a neural network? | Deep learning chapter 1
18:40
3Blue1Brown
Рет қаралды 18 МЛН
How I’d learn ML in 2024 (if I could start over)
7:05
Boris Meinardus
Рет қаралды 1,3 МЛН
Talk to your database with Next.js and the AI SDK
19:22
Nico Albanese
Рет қаралды 1 М.
Devin review: is it a better AI coding agent than Cursor?
9:18
Steve (Builder.io)
Рет қаралды 124 М.
Cursor Tutorial for Beginners (AI Code Editor)
15:20
Tech With Tim
Рет қаралды 134 М.
The Rust Survival Guide
12:34
Let's Get Rusty
Рет қаралды 176 М.
React Tutorial for Beginners
1:20:04
Programming with Mosh
Рет қаралды 3,8 МЛН