I'm not through it yet, but this might be the most useful tutorial I've seen. The reason this is so useful is because you're not just showing what to do, you're showing how to learn. I'm new to coding since ChatGPT (as many of us are), and I had no idea about so many of these resources.
Great tutorial! Only one suggestion: Please use slit screen instead of covering halft of your code with your browser window. Again, amazing tutorial regardless.
I just built something similar with Laravel and Livewire. After 10+ years of using Laravel while constantly evaluating new competing tech, I think Next.js is the only thing that's come close to Laravel in terms of community, content, polish, packages, etc. Next.js + shadcn is a powerful combination. Out of curiosity, what package would you use to render markdown in realtime? That was one of the larger hurdles of the Laravel/Livewire version. Thanks for the lesson.
can you or do you have a tutorial for handling a front end in next.js and a backend with Azure OpenAI and fastapi ... how to handle the streaming to forward from backend to frontend ?
@@hamedbahram Thank you ! because I currently have a backend in fastapi that gives a long answer in the log but doesn't forward it to the frontend in next.js ... Maybe i don't handle the timeout and/or streaming properly !
Thanks Hamed, excellent video! I've watched several of your videos and they are all very helpful. I like the idea of using server actions when an api isn't necessary. Do you think it's possible to stream the ai completion text from a server action instead of an api? I'm still new to React and Next.js. I'm not sure if this is possible or if it would be a good idea. Thanks again for the great content!
Good question! Yes you can stream a response back from server actions. There is an experimental function in the `ai` SDK that allows you to stream from server action. Read more here → sdk.vercel.ai/docs/api-reference/streaming-react-response
How do you go about fixing the OpenAIStream Deprecation? I'm curious as to what they replaced it with, and how we would update that to reflect the new model.
I'm not through it yet, but this might be the most useful tutorial I've seen. The reason this is so useful is because you're not just showing what to do, you're showing how to learn. I'm new to coding since ChatGPT (as many of us are), and I had no idea about so many of these resources.
I'm glad to hear you found it useful. Thanks for your comment!
Great tutorial! Only one suggestion: Please use slit screen instead of covering halft of your code with your browser window. Again, amazing tutorial regardless.
Thanks! appreciate the feedback.
Short, Informative and to the point.
Thanks!
powerful lesson. exactly what i was looking for... thank you
Glad it was helpful!
Bro. I don't know how I would do without you. It's not the fist time. You're like my wife. Thank you.
Glad to help
i love the way you teaching . thank you very much .
Glad to hear that!
I just built something similar with Laravel and Livewire. After 10+ years of using Laravel while constantly evaluating new competing tech, I think Next.js is the only thing that's come close to Laravel in terms of community, content, polish, packages, etc. Next.js + shadcn is a powerful combination. Out of curiosity, what package would you use to render markdown in realtime? That was one of the larger hurdles of the Laravel/Livewire version. Thanks for the lesson.
No worries! I agree NextJs is awesome. I've used react-markdown for rendering markdown.
very helpful - Thank you
My pleasure!
can you or do you have a tutorial for handling a front end in next.js and a backend with Azure OpenAI and fastapi ... how to handle the streaming to forward from backend to frontend ?
I don't have that currently but could be an interesting usecase. I'll keep that in mind.
@@hamedbahram Thank you ! because I currently have a backend in fastapi that gives a long answer in the log but doesn't forward it to the frontend in next.js ... Maybe i don't handle the timeout and/or streaming properly !
Great explanation, Waiting for next video ...
Thanks! Stay tuned...
Thanks Hamed, excellent video! I've watched several of your videos and they are all very helpful.
I like the idea of using server actions when an api isn't necessary. Do you think it's possible to stream the ai completion text from a server action instead of an api? I'm still new to React and Next.js. I'm not sure if this is possible or if it would be a good idea.
Thanks again for the great content!
Good question! Yes you can stream a response back from server actions. There is an experimental function in the `ai` SDK that allows you to stream from server action. Read more here → sdk.vercel.ai/docs/api-reference/streaming-react-response
How do you go about fixing the OpenAIStream Deprecation? I'm curious as to what they replaced it with, and how we would update that to reflect the new model.
I'd have to look into that update.
great! very crisp and informative. I will try it.. a quick question, do we have to deploy on vercel , can we have our own servers?
Glad to hear that! No you don't need to deploy to Vercel necessarily.
@@hamedbahram Thank you !
do I need to buy the subscription in order to use API key ?
Unfortunately yes, openAI API is not free but pretty affordable.
@@hamedbahram THANKS SIR FOR REPLING I THINK YOU WILL NOT MAY YOU
ALSO GET GUIDANCE WHEN YOU STUCK ANYWHERE
Good information
Thanks!
This is great! Do you how to create an input or textarea that grows with the user's input? Just like in ChatGPT?
Good question 🤔 Haven't done it before. Will give it a try, stay tuned.
@@hamedbahram 🫶
did not work for me
what to do
What is the problem you're facing?
@@hamedbahram when i send message it keeps on refreshing
and github code is a little diffrent why?
@@hamedbahram when i post message it refreshes
Good video, but I can't use this, because it is paid. :/
I know, sorry to hear that man!