Тёмный

Hands on with the Vercel AI SDK 3.1 

Vercel
Подписаться 84 тыс.
Просмотров 25 тыс.
50% 1

Learn how you can use the Vercel AI SDK as your Typescript Framework for building AI applications.
0:00 - Introduction
0:28 - Generate Text
1:31 - Stream Text
2:18 - Generate Object
3:15 - Stream Object
3:55 - Tools
6:05 - Building a chatbot with AI SDK UI
7:31 - Generative UI chatbot with AI SDK RSC
12:22 - Conclusion
◆ Repo with examples: github.com/nicoalbanese/ai-sd...
◆ Docs: sdk.vercel.ai/docs
◆ Blog: vercel.com/blog/vercel-ai-sdk...
◆ Demo: chat.vercel.ai/
◆ v0: v0.dev

Наука

Опубликовано:

 

19 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 86   
@TomAsh519
@TomAsh519 Месяц назад
Could you please do a tutorial on the combined use of ai ask with long chain adapter that utilizes eg. simple RAG? From your documentation it is not clear how to implement it properly.
@MilindMishra
@MilindMishra Месяц назад
Thanks for the walkthough! Looking fwd to build generative ui stuff :)
@whovivekshukla
@whovivekshukla Месяц назад
I tried out their streaming ui a few months ago! that was pretty dope!
@syndg
@syndg Месяц назад
Was just about to send you this video for our reference. Glad to see you already watched it!
@michaelo4u
@michaelo4u 29 дней назад
Thanks! Great job simplifying it.
@DS-ow2ge
@DS-ow2ge Месяц назад
Each new generative UI example from you guys is implemented in a different pattern. From manually intercepting response types to the latest streamui+tools. Does the team feel this present pattern is mature or are they unhappy with it and will be redoing it next month?
@fagnersales532
@fagnersales532 Месяц назад
Nice observation
@carloslfu
@carloslfu Месяц назад
Yeah, but this is why it experimental. Use at your own risk!
@shuding
@shuding 29 дней назад
Hey, AI SDK maintainer here! I'm not sure what you're referring to regarding "intercepting response types", but `streamUI` is pretty stable. It's the same as the previous experimental `render` function, but with a more consistent name as other APIs like `streamText` and `streamObject`. Also worth mentioning that the Generative UI APIs are designed to be general enough and fit into any UI patterns and AI pipelines, which means that there isn't only one way to do Generative UI. For example, you can just use `streamUI` + tools to handle LLM + UI, or combine low-level utilities like `createStreamableUI`/`createStreamableValue` and your existing pipeline for flexibility. Happy to answer any questions!
@wshewm
@wshewm 29 дней назад
@@shuding What are your recommendations for maintaining type-safety in the application, especially surrounding the server actions and use of the `useActions` hook? Unless I'm missing something, it seems like the required use of the hook defeats one of the major benefits of server actions: end to end type safety. Is there maybe a lower-level approach that I could take to bypass the hook?
@itszachhan
@itszachhan 29 дней назад
​@@shuding Can you use libraries like shadcn and nextui for the streamed components? Last time I tried, it wasnt working
@ahmadbilalfarooqi5731
@ahmadbilalfarooqi5731 Месяц назад
great explain by AI SDK of Vercel its really helpful and easiest for building application with the use of predefined function and method
@NityanandaDeGaneshpuri
@NityanandaDeGaneshpuri 28 дней назад
Thank you guys!
@yaseerokino
@yaseerokino Месяц назад
Vercel always coming through for developers
@TheJuava
@TheJuava 29 дней назад
Great Overview! A Video incorporating RAG with Vercel AI SDK would be awesome!
@nicoalbanese10
@nicoalbanese10 25 дней назад
Thanks for the suggestion - this is on our list!
@0xOmzi
@0xOmzi 4 дня назад
Hyped! 🥳
@usagisan79
@usagisan79 Месяц назад
ilove ai sdk and kirimase both!
@raphauy
@raphauy Месяц назад
Awesome!
@asimalqasmi7316
@asimalqasmi7316 Месяц назад
Let me recall the kirimase dream I had
@0xOmzi
@0xOmzi 28 дней назад
Thanks for this great video! Looking forward to trying my hands out on the latest release! Kudos to the Vercel AI team too!
@journeyofc6200
@journeyofc6200 Месяц назад
dope!!
@daniloitj
@daniloitj 18 дней назад
Very good explanation. If possible, could you connect streamUI with assistants? I also had a lot of difficulty separating the tools into other files.
@remiib18
@remiib18 Месяц назад
Is it still not possible to use both the regular tools to fetch data and the tools to return components ?
@jrmumm
@jrmumm 25 дней назад
how does it stream a structured object? doesn't the stream come back as JSON? how can it parse it if it's not fully complete?
@andru5054
@andru5054 5 дней назад
Hey, awesome demo - thanks. We're using llamaindex in Python for our LLM backend that uses RAG. I want to use tools that pass react components to the frontend - how would I accomplish this? Thank you
@rhyscampbell4178
@rhyscampbell4178 23 дня назад
NICO!!!!!
@xberna8156
@xberna8156 29 дней назад
I could not find an example in the Docs where the model can use Tools and return RSC while also being able to Stream a response when no Tool is used. All the example I could find use generateText() or streamUi() so the text response Is not a Stream. Should I use a combination of streamText() + Tools + createStreamableUi() to Stream text and have Tools that can return RSC?
@hakarsheikh7853
@hakarsheikh7853 28 дней назад
Great question im interested to know too
@nicoalbanese10
@nicoalbanese10 25 дней назад
Hey! With `streamUI`, if no tool is used, the text response is streamed via the component returned from the `text` function. Is that what you're looking to do?
@xberna8156
@xberna8156 25 дней назад
@@nicoalbanese10 Yes, that's correct. I would like to stream the text token by token when the model does not use a tool. Can I achieve that using streamUI?
@ShaneCrenshaw
@ShaneCrenshaw 15 дней назад
Is there an example with streamUI and error handling for things like finishReason and usage?
@JustOmmShah
@JustOmmShah Месяц назад
Where do you keep the API Key?
@andreschou9560
@andreschou9560 Месяц назад
sick
@Samuelsward96
@Samuelsward96 2 дня назад
Hey i'm struggling a bit with the useChat for multiple conversations. How can i keep multiple conversations active at once? Any tips?
@jrmumm
@jrmumm 25 дней назад
when you stream an object, you get a partial. how do you get the final/full response (not partial)?
@nenadbanjeglav2081
@nenadbanjeglav2081 Месяц назад
Can I use this in next.js out of the box?
25 дней назад
Someone knows how to Improve the response using the API of openAI? Seems like the chat-gtp web app the results are a lot better. Using the API returns very similar responses, in this case, asking "tell me a joke" answer the same thing over and over again. Another great API btw
@TomAsh519
@TomAsh519 29 дней назад
it is me only or this tutorial and the repo does not work? I got Error: `useUIState` must be used inside an provider. to resolve it add import { AI } from "./action"; to root layout: export default function RootLayout({ children, }: Readonly) { return ( {children} ); }
@ShaneCrenshaw
@ShaneCrenshaw 15 дней назад
If you are calling getAiState or useUIState, it has to happen inside of So you could create a new component and do something like and inside of Chat, that's where you would use uiUIState
@FelixWaigner
@FelixWaigner 28 дней назад
When will i be able to use this with langchain?
@yogeshrathod953
@yogeshrathod953 Месяц назад
Can it work with ollama
@malaytiwari3207
@malaytiwari3207 11 дней назад
How do I pass the API key?
@Jake-bh1hm
@Jake-bh1hm Месяц назад
is this compatible with sveltekit 5?
@mustofa_id
@mustofa_id Месяц назад
yes
@ShouryanNikam
@ShouryanNikam Месяц назад
how do you make the code animations?
@dawidwraga
@dawidwraga Месяц назад
I'm just gonna leave a comment here so I'm notified if someone responds 👀
@mishal_legit
@mishal_legit Месяц назад
.
@ahmoin
@ahmoin Месяц назад
/free
@rude_people_die_young
@rude_people_die_young Месяц назад
Great use of zod ❤
@zivtamary
@zivtamary Месяц назад
+1
@rutvijdoshi9664
@rutvijdoshi9664 26 дней назад
Can we fine tune this model ?
@mymorningjacket_
@mymorningjacket_ 28 дней назад
Anyone have a great example on how to get the user's actual location here?
@nicoalbanese10
@nicoalbanese10 25 дней назад
You can run any asynchronous javascript code within a tools' execute function. So you would first want to find the exact location based on the search query (eg. openstreetmap). Then pass that to a weather api (eg. open-meteo) and return the resulting temperature 😊
@mymorningjacket_
@mymorningjacket_ 22 дня назад
@@nicoalbanese10 thanks for the suggestion, nico!
@JeomonGeorge
@JeomonGeorge 7 дней назад
can I use ai vercel in vue.js
@simpingsyndrome
@simpingsyndrome Месяц назад
will it work for React Native?, i wanna build my ai chatbot mobile app.
@jeanysergeimezarodriguez8629
@jeanysergeimezarodriguez8629 Месяц назад
i have the same question hehe
@wshewm
@wshewm 29 дней назад
This is cool and all, but it seems that around every corner in this SDK (especially with the rsc stuff) all the types are just 'any'. In my opinion, you can't really call your library "The AI Framework for TypeScript" and then not have strong types. This is especially annoying because in my eyes it defeats one of the major benefits of server actions: end-to-end type safety. Is there a way to bypass some of the abstractions, like the useActions hook?
@CarlottaRiganti
@CarlottaRiganti 27 дней назад
But how do you npm?
@smitty7326
@smitty7326 16 дней назад
god i wish i knew about vercel ai like 6 months ago lol
@aneesmanzoor7340
@aneesmanzoor7340 Месяц назад
how to create these coding videos with animations like this kindly create a video on that as well @vercel
@sanukjoseph
@sanukjoseph Месяц назад
🤩❣...
@GAllium14
@GAllium14 24 дня назад
Vercel ai sdk + RAG tutorial
@maharshiguin7813
@maharshiguin7813 Месяц назад
New version of ai package has too much abstractions
@wshewm
@wshewm 29 дней назад
Agreed. It destroys the type-safety, especially with RSC and the useActions hook.
@LutherDePapier
@LutherDePapier Месяц назад
Where's Lee?
@leerob
@leerob 29 дней назад
I'm here :)
@andriisukhariev
@andriisukhariev Месяц назад
train without stops
@RoccoGhielmini
@RoccoGhielmini 28 дней назад
I can't concentrate because they keep saying next
@nicoalbanese10
@nicoalbanese10 25 дней назад
Sorry about that, will work on it for the next one!
@The.Explorer849
@The.Explorer849 28 дней назад
I made 8 subscribers 😊
@yarapolana
@yarapolana Месяц назад
I added $10 to test open ai and ai sdk and I had 100% of “unknown error” calls and $8 used?! What in the world it wasnt like this before. Loads of retries in the background (should be opted out from the start)
@karamanabdullah
@karamanabdullah Месяц назад
is it free?
@mohammednasser2159
@mohammednasser2159 Месяц назад
It's just a library, using it is free, however using the models, Like Gemini and GPT4o requires a token, which will almost always cost money
@karamanabdullah
@karamanabdullah Месяц назад
@@mohammednasser2159 thank you
@leerob
@leerob 29 дней назад
@@mohammednasser2159 thank you! Yes exactly.
@maskedvillainai
@maskedvillainai Месяц назад
Ugh I hate using gpt. Why isn’t anyone doing Gemini especially since it’s in free beta
@jasonjefferson6596
@jasonjefferson6596 25 дней назад
Is this a real human or synthetic?
Далее
Bringing React Components to AI
12:41
Просмотров 35 тыс.
What Makes A Great Developer
27:12
Просмотров 140 тыс.
OMG! Bei der Hochzeit betrogen 😨 #tricks
00:43
Просмотров 2 млн
AI SDK 3.1 First Impressions
24:12
Просмотров 4,8 тыс.
Learn TypeScript Generics In 13 Minutes
12:52
Просмотров 222 тыс.
The Story of React Query
8:55
Просмотров 87 тыс.
Senior Angular Developer Interview (theory)
41:57
Просмотров 7 тыс.
Why JavaScript Devs are Switching to Rust in 2024
10:35
So You Think You Know Git - FOSDEM 2024
47:00
Просмотров 993 тыс.
HTMX Sucks
25:16
Просмотров 98 тыс.
Cool Tools I’ve Been Using Lately
23:11
Просмотров 173 тыс.
ТОП-5 культовых телефонов‼️
1:00
How To Unlock Your iphone With Your Voice
0:34
Просмотров 24 млн
Will the battery emit smoke if it rotates rapidly?
0:11
Неразрушаемый смартфон
1:00
Просмотров 1,2 млн