How to Use the Gemini API with Python - Build a Customizable AI Chatbot

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024

ความคิดเห็น • 45

  • @abdullahmahir8478
    @abdullahmahir8478 21 ชั่วโมงที่ผ่านมา

    bro, u nailed it. for past 3 days i'm trying to build a chatbot for myself. Finally i saw this video ❤‍🔥

  • @ashimov1970
    @ashimov1970 หลายเดือนก่อน +1

    The most awesome, concise, neat, clean and up-to-date content on how to leverage Gemini API

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  หลายเดือนก่อน +1

      Thank you so much for your comment! I’m happy you found the video useful.

  • @scamorza4786
    @scamorza4786 2 หลายเดือนก่อน +1

    Thank you so much for the video!! I don't know how to code and I learned how to create inputs thanks to you!

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  2 หลายเดือนก่อน +1

      That’s great! Learning to code is challenging but very rewarding. I hope you will find my future videos helpful as well 😊

  • @enmingwang6332
    @enmingwang6332 2 หลายเดือนก่อน +1

    As always, very clear explanation and demo! Really enjoyed your informative lecture, greatly appreciated 👍👍

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  2 หลายเดือนก่อน

      Thank you! I’m happy you found the video useful. There will be many more coming.

  • @rajagurur1978
    @rajagurur1978 หลายเดือนก่อน

    I was struck in Saving the chat history. It helped me sir... thanks a lot...you just got a new subscriber ✨😌

  • @Its_Alan_Paul
    @Its_Alan_Paul หลายเดือนก่อน

    Thankyou so much for this video. Please do make more. Really simple and applicable.

  • @myquestforknowledge
    @myquestforknowledge หลายเดือนก่อน

    Nice video, crisp and concise. Thanks and you've got a new subscriber.

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  หลายเดือนก่อน

      Thank you. I’m glad you enjoyed the video!

  • @LanningRon
    @LanningRon 27 วันที่ผ่านมา

    Great tutorial! It was clear and easily reproducible. Thank you!

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  23 วันที่ผ่านมา

      Thanks you for the comment! I’m glad the video was helpful. I plan to make more so let me know what you would like to see.

  • @rustcartoonmovies302
    @rustcartoonmovies302 3 หลายเดือนก่อน +1

    tq sir it was good help to bulid my mini project for college

  • @poojasundar2115
    @poojasundar2115 22 วันที่ผ่านมา

    Actually, the pretty clear tutorial I've ever seen neat explanation, But I have a doubt What should we do when we prompted the model with pdf? can you make a video for that? and also integrated with UI design?

  • @Eric-qz5hz
    @Eric-qz5hz 8 วันที่ผ่านมา

    WOW great video thanks alot!

  • @abdullahmahir8478
    @abdullahmahir8478 14 ชั่วโมงที่ผ่านมา

    error : No module named 'google'
    but i downloaded all the requirements. can i know the reason?

  • @Calvinshukla
    @Calvinshukla 13 วันที่ผ่านมา

    how am i suppose to access the history?

  • @techwithsibro
    @techwithsibro 2 หลายเดือนก่อน

    Thanks a lot!

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  2 หลายเดือนก่อน

      You’re welcome! Let me know if there is any specific content that you would be interested in seeing.

  • @vietdihoc
    @vietdihoc 17 วันที่ผ่านมา

    How many requests can you make for each key?

  • @mohamedmosad1117
    @mohamedmosad1117 3 หลายเดือนก่อน

    great video , thanks for this video

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน

      Thanks. Happy to hear it was useful.

  • @RafTFS
    @RafTFS 3 หลายเดือนก่อน +2

    how can you change this to run as a google Cloud Run?

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน

      To run your chatbot on Google Cloud Run, you'll need to containerize your application using Docker, then deploy it. This involves creating a Dockerfile to package your code and dependencies, pushing the image to Google Container Registry, and deploying it via the Google Cloud Console. You can follow Google's Cloud Run quickstart guide (cloud.google.com/run/docs/quickstarts ) for detailed steps. If there's interest, I could create a detailed tutorial video on this process in the future.

    • @RafTFS
      @RafTFS 3 หลายเดือนก่อน

      @@aarondunn-zt7ev that would be great if you could make such a tutorial. I have tried to put it on cloud run but my understanding is lacking. I keep getting a "service Unavailable" message on my run url. Im also not sure if I need to get a secret key etc. (my program runs fine from the console, but fails from the cloud run url). Anyway, great tutorials and I have subscribed :)

  • @havearelax31401
    @havearelax31401 2 หลายเดือนก่อน

    You are great man cheers

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  2 หลายเดือนก่อน

      Thanks! I appreciate the comment. Let me know what other content you would like to see.

    • @havearelax31401
      @havearelax31401 2 หลายเดือนก่อน

      @@aarondunn-zt7ev It will be great if you use GEMNI API and made a chatbot, which will use custom datasheet from me.

  • @EchoesofHeartbreak
    @EchoesofHeartbreak 3 หลายเดือนก่อน +1

    Can you make this gemini able to recognize images, create titles and tags and subjects (metadata), thanks

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน +2

      Yes, definitely! Gemini 1.5 is multimodal and can take images, audio and video in the prompt with text. I am working on a video on Gemini for vision / images right now and will let you know when it’s posted.

    • @EchoesofHeartbreak
      @EchoesofHeartbreak 3 หลายเดือนก่อน

      @@aarondunn-zt7ev okay, ty

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน +1

      I just uploaded my video on Gemini for vision. Check it out here: th-cam.com/video/XcMcNBZawAU/w-d-xo.htmlsi=6p93NAlB6o9DePnz

  • @karkids
    @karkids 2 หลายเดือนก่อน +1

    What google cloud project for API key

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  2 หลายเดือนก่อน +1

      You would select whatever project you want your Gemini code associated with. If you don’t have any Google Cloud projects then you should be able to select a Default option. Let me know if this doesn’t work and I’ll take a closer look.

    • @karkids
      @karkids 2 หลายเดือนก่อน

      I choose the generative language client and there is a key error every time

  • @Its_Alan_Paul
    @Its_Alan_Paul หลายเดือนก่อน

    Is there something wrong wit Audio ?

    • @Its_Alan_Paul
      @Its_Alan_Paul หลายเดือนก่อน

      Nah that was my Laptop.

  • @parthmahadik6038
    @parthmahadik6038 3 หลายเดือนก่อน

    How can we feed it our customised data so that it behaves based on the data and response accordingly

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน +2

      There are 2 approaches you can take. One is to just put all your data inside the prompt. This is possible nowadays even with big datasets as models now have huge context windows (up to 2 million tokens for Gemini 1.5 Pro). However, adding too much data to the prompt can be costly and even result in lower quality answers.
      The other approach is RAG (Retrieval Augmented Generation) which extracts smaller chunks of your dataset that are similar to your input query / question and then uses that data to produce an answer. This is much more efficient and when done properly may even result in better outputs.
      With either method, you would include in the prompt an instruction to only consider the data you provided when generating the response. This doesn’t work 100% of the time but overall it’s pretty reliable.
      I put out a video a little while back that demonstrated RAG for a chatbot and how to restrict the model to the data you provide. Check out the video here: th-cam.com/video/cpm28hEvGAA/w-d-xo.htmlsi=qAX6wM0ytI_VSu7v

  • @mohamedashiq8248
    @mohamedashiq8248 3 หลายเดือนก่อน

    Hi can we create a customized data and it should answer only for customized data not should answer all the data

    • @iftekharansari5558
      @iftekharansari5558 3 หลายเดือนก่อน

      In the model give a system instruction like, (system instruction= "Give response only from the file uploaded and not from outside the pdf or csv file provided" ) . This will limit it to answer only from the knowledge base given, feel free to customise your system instructions.

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน

      There are 2 approaches you can take. One is to just put all your data inside the prompt. This is possible nowadays even with big datasets as models now have huge context windows (up to 2 million tokens for Gemini 1.5 Pro). However, adding too much data to the prompt can be costly and even result in lower quality answers.
      The other approach is RAG (Retrieval Augmented Generation) which extracts smaller chunks of your dataset that are similar to your input query / question and then uses that data to produce an answer. This is much more efficient and when done properly may even result in better outputs.
      With either method, you would include in the prompt an instruction to only consider the data you provided when generating the response. This doesn’t work 100% of the time but overall it’s pretty reliable.
      I put out a video a little while back that demonstrated RAG for a chatbot and how to restrict the model to the data you provide. Check out the video here: th-cam.com/video/cpm28hEvGAA/w-d-xo.htmlsi=qAX6wM0ytI_VSu7v

  • @tawanbaohlopet9034
    @tawanbaohlopet9034 3 หลายเดือนก่อน

    How do I add germini with my Facebook page?

    • @aarondunn-zt7ev
      @aarondunn-zt7ev  3 หลายเดือนก่อน +1

      I don’t have any experience creating Facebook apps, but I can look to do some more research on it. From what I’ve discovered so far, to add a Gemini-powered chatbot to your Facebook page, you'll need to integrate it using Facebook Messenger's API. This involves setting up a Facebook Developer account, creating a Facebook app, and configuring a webhook to handle messages. You'd then connect the Gemini API to process and respond to these messages. It would be an interesting project and video!