Тёмный

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

Aaron Dunn
Подписаться 174
Просмотров 3,7 тыс.
50% 1

This is a step-by-step tutorial on using the Gemini AI API with Python. The video includes getting setup with Gemini, touring the playground and parameter selections and then building a customizable chatbot.
Don't forget to like, share, and subscribe for more tutorials and tech tips!
Code on Github: github.com/adjdunn/Gemini-Pyt...
0:00 Intro & Setup
1:00 Playground
5:00 Create Chatbot
#GeminiAI #Python #Chatbot #AI #LLM #CodingTutorial #TechTips #Programming #APITutorial #Chatbot

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

 

2 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@enmingwang6332
@enmingwang6332 3 дня назад
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.
@scamorza4786
@scamorza4786 5 дней назад
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 дня назад
That’s great! Learning to code is challenging but very rewarding. I hope you will find my future videos helpful as well 😊
@rustcartoonmovies302
@rustcartoonmovies302 Месяц назад
tq sir it was good help to bulid my mini project for college
@mohamedmosad1117
@mohamedmosad1117 Месяц назад
great video , thanks for this video
@aarondunn-zt7ev
@aarondunn-zt7ev Месяц назад
Thanks. Happy to hear it was useful.
@techwithsibro
@techwithsibro 21 день назад
Thanks a lot!
@aarondunn-zt7ev
@aarondunn-zt7ev 20 дней назад
You’re welcome! Let me know if there is any specific content that you would be interested in seeing.
@havearelax31401
@havearelax31401 8 дней назад
You are great man cheers
@aarondunn-zt7ev
@aarondunn-zt7ev 7 дней назад
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.
@RafTFS
@RafTFS Месяц назад
how can you change this to run as a google Cloud Run?
@aarondunn-zt7ev
@aarondunn-zt7ev Месяц назад
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 Месяц назад
@@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 :)
@MusikMozaiK
@MusikMozaiK Месяц назад
Can you make this gemini able to recognize images, create titles and tags and subjects (metadata), thanks
@aarondunn-zt7ev
@aarondunn-zt7ev Месяц назад
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.
@MusikMozaiK
@MusikMozaiK Месяц назад
@@aarondunn-zt7ev okay, ty
@aarondunn-zt7ev
@aarondunn-zt7ev 26 дней назад
I just uploaded my video on Gemini for vision. Check it out here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XcMcNBZawAU.htmlsi=6p93NAlB6o9DePnz
@parthmahadik6038
@parthmahadik6038 Месяц назад
How can we feed it our customised data so that it behaves based on the data and response accordingly
@aarondunn-zt7ev
@aarondunn-zt7ev 26 дней назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cpm28hEvGAA.htmlsi=qAX6wM0ytI_VSu7v
@karkids
@karkids 15 дней назад
What google cloud project for API key
@aarondunn-zt7ev
@aarondunn-zt7ev 13 дней назад
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 6 дней назад
I choose the generative language client and there is a key error every time
@mohamedashiq8248
@mohamedashiq8248 Месяц назад
Hi can we create a customized data and it should answer only for customized data not should answer all the data
@iftekharansari5558
@iftekharansari5558 29 дней назад
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 26 дней назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cpm28hEvGAA.htmlsi=qAX6wM0ytI_VSu7v
@tawanbaohlopet9034
@tawanbaohlopet9034 Месяц назад
How do I add germini with my Facebook page?
@aarondunn-zt7ev
@aarondunn-zt7ev Месяц назад
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!
Далее
AI Data Agent with Gemini API | Build with Google AI
11:22
Советы на всё лето 4
00:23
Просмотров 353 тыс.
Build AI Agents with Docker, Here’s How
51:59
Просмотров 55 тыс.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
This AI Agent can Scrape ANY WEBSITE!!!
17:44
Просмотров 48 тыс.
Gemini AI API with Python Latest Tutorial
4:30
Просмотров 22 тыс.