The easiest way to build an AI chatbot in NextJs

Поділитися
Вставка
  • Опубліковано 25 сер 2024

КОМЕНТАРІ • 43

  • @smitty7326
    @smitty7326 2 місяці тому +1

    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.

    • @hamedbahram
      @hamedbahram  2 місяці тому

      I'm glad to hear you found it useful. Thanks for your comment!

  • @fedecampos4476
    @fedecampos4476 2 місяці тому +1

    Great tutorial! Only one suggestion: Please use slit screen instead of covering halft of your code with your browser window. Again, amazing tutorial regardless.

    • @hamedbahram
      @hamedbahram  2 місяці тому

      Thanks! appreciate the feedback.

  • @amankch
    @amankch 6 місяців тому +1

    Short, Informative and to the point.

  • @oghenefejiroprinceimene6090
    @oghenefejiroprinceimene6090 6 місяців тому +1

    powerful lesson. exactly what i was looking for... thank you

  • @lenatoo972
    @lenatoo972 3 місяці тому

    Bro. I don't know how I would do without you. It's not the fist time. You're like my wife. Thank you.

  • @DeepLook1
    @DeepLook1 6 місяців тому +1

    i love the way you teaching . thank you very much .

  • @martinsloan5760
    @martinsloan5760 6 місяців тому +1

    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.

    • @hamedbahram
      @hamedbahram  6 місяців тому +1

      No worries! I agree NextJs is awesome. I've used react-markdown for rendering markdown.

  • @lalaniwerake881
    @lalaniwerake881 2 місяці тому +1

    very helpful - Thank you

  • @jackbauer322
    @jackbauer322 3 місяці тому +1

    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
      @hamedbahram  3 місяці тому +1

      I don't have that currently but could be an interesting usecase. I'll keep that in mind.

    • @jackbauer322
      @jackbauer322 3 місяці тому

      @@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 !

  • @git-sujon
    @git-sujon 6 місяців тому +1

    Great explanation, Waiting for next video ...

  • @Gopster2009
    @Gopster2009 6 місяців тому +1

    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!

    • @hamedbahram
      @hamedbahram  6 місяців тому +1

      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

  • @austindonovan4162
    @austindonovan4162 2 місяці тому +1

    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.

    • @hamedbahram
      @hamedbahram  2 місяці тому

      I'd have to look into that update.

  • @uncoolcoder
    @uncoolcoder 6 місяців тому +1

    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?

    • @hamedbahram
      @hamedbahram  6 місяців тому +1

      Glad to hear that! No you don't need to deploy to Vercel necessarily.

    • @uncoolcoder
      @uncoolcoder 6 місяців тому +1

      @@hamedbahram Thank you !

  • @pro-ik4rw
    @pro-ik4rw Місяць тому +1

    do I need to buy the subscription in order to use API key ?

    • @hamedbahram
      @hamedbahram  Місяць тому

      Unfortunately yes, openAI API is not free but pretty affordable.

    • @pro-ik4rw
      @pro-ik4rw Місяць тому

      ​@@hamedbahram THANKS SIR FOR REPLING I THINK YOU WILL NOT MAY YOU
      ALSO GET GUIDANCE WHEN YOU STUCK ANYWHERE

  • @hulashmahto99
    @hulashmahto99 6 місяців тому +1

    Good information

  • @edgargut
    @edgargut 6 місяців тому +1

    This is great! Do you how to create an input or textarea that grows with the user's input? Just like in ChatGPT?

    • @hamedbahram
      @hamedbahram  6 місяців тому +1

      Good question 🤔 Haven't done it before. Will give it a try, stay tuned.

    • @edgargut
      @edgargut 6 місяців тому

      @@hamedbahram 🫶

  • @kartik1311
    @kartik1311 3 місяці тому

    did not work for me
    what to do

    • @hamedbahram
      @hamedbahram  3 місяці тому

      What is the problem you're facing?

    • @kartik1311
      @kartik1311 3 місяці тому

      @@hamedbahram when i send message it keeps on refreshing

    • @kartik1311
      @kartik1311 3 місяці тому

      and github code is a little diffrent why?

    • @kartik1311
      @kartik1311 3 місяці тому

      @@hamedbahram when i post message it refreshes

  • @d4rzk252
    @d4rzk252 6 місяців тому +1

    Good video, but I can't use this, because it is paid. :/

    • @hamedbahram
      @hamedbahram  6 місяців тому

      I know, sorry to hear that man!