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

  Рет қаралды 24,944

Aaron Dunn

Aaron Dunn

Күн бұрын

Пікірлер: 67
@JSambrook
@JSambrook Ай бұрын
Hi Aaron - I have been an embedded software developer (medical devices) for decades. I want to say thank you for this tutorial. Really appreciate the pace and the content. Thanks for not wasting time on fluff. Following you now.
@aarondunn-zt7ev
@aarondunn-zt7ev Ай бұрын
Thank you. I really appreciate your comment! Let me know if there is any specific content that you would like to see.
@JSambrook
@JSambrook Ай бұрын
I am going to be looking into function calling from different LLMs. I have been playing around with the so-called "computer use" workflow from Anthropic. It's intriguing but also runs into rate limits quickly. I am most interested in practical applications of using function calling from LLMs with the hope of automating various repetitive tasks I find myself needing / wanting to do fairly often.
@ashimov1970
@ashimov1970 5 ай бұрын
The most awesome, concise, neat, clean and up-to-date content on how to leverage Gemini API
@aarondunn-zt7ev
@aarondunn-zt7ev 4 ай бұрын
Thank you so much for your comment! I’m happy you found the video useful.
@SHREYASSKRISHNASA
@SHREYASSKRISHNASA 9 күн бұрын
Thank you for this informative video
@rajagurur1978
@rajagurur1978 4 ай бұрын
I was struck in Saving the chat history. It helped me sir... thanks a lot...you just got a new subscriber ✨😌
@abdullahmahir8478
@abdullahmahir8478 3 ай бұрын
bro, u nailed it. for past 3 days i'm trying to build a chatbot for myself. Finally i saw this video ❤‍🔥
@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 5 ай бұрын
That’s great! Learning to code is challenging but very rewarding. I hope you will find my future videos helpful as well 😊
@GrahamFMcElearney
@GrahamFMcElearney 3 ай бұрын
Thanks Aaron this is ace. took me a few goes to figure out how to lpad my api key but figured it out - it's quite magical when you get it going! Thanks again!
@enmingwang6332
@enmingwang6332 5 ай бұрын
As always, very clear explanation and demo! Really enjoyed your informative lecture, greatly appreciated 👍👍
@aarondunn-zt7ev
@aarondunn-zt7ev 5 ай бұрын
Thank you! I’m happy you found the video useful. There will be many more coming.
@abhishekdubey8115
@abhishekdubey8115 Ай бұрын
your content is so well delivered thank you so much
@aarondunn-zt7ev
@aarondunn-zt7ev Ай бұрын
Thank you. I appreciate it!
@myquestforknowledge
@myquestforknowledge 4 ай бұрын
Nice video, crisp and concise. Thanks and you've got a new subscriber.
@aarondunn-zt7ev
@aarondunn-zt7ev 4 ай бұрын
Thank you. I’m glad you enjoyed the video!
@Its_Alan_Paul
@Its_Alan_Paul 4 ай бұрын
Thankyou so much for this video. Please do make more. Really simple and applicable.
@LanningRon
@LanningRon 4 ай бұрын
Great tutorial! It was clear and easily reproducible. Thank you!
@aarondunn-zt7ev
@aarondunn-zt7ev 4 ай бұрын
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 6 ай бұрын
tq sir it was good help to bulid my mini project for college
@dommikador6524
@dommikador6524 2 ай бұрын
Super easy to grasp..
@manethninduwara1940
@manethninduwara1940 10 күн бұрын
Very useful
@MatheusSantos-yg2zf
@MatheusSantos-yg2zf 3 күн бұрын
Very good video, how do I add it to a ready made code?
@worldbrightmoviesempire5833
@worldbrightmoviesempire5833 Ай бұрын
Great tutorial
@Eric-qz5hz
@Eric-qz5hz 3 ай бұрын
WOW great video thanks alot!
@filzaahsan6409
@filzaahsan6409 17 күн бұрын
how to integrate this on a website?
@larifond
@larifond 2 ай бұрын
I am a French developer, and I would like to know, first, if it is possible to make the ChatBot speak in French and, secondly, if it is possible to get the remaining tokens. Otherwise, thank you very much, this video really helped me.
@ishaankelkar3908
@ishaankelkar3908 Ай бұрын
I believe it knows French it just needs to have inputs in French
@abayomijoshua7529
@abayomijoshua7529 2 ай бұрын
Nice great and wonderful
@poojasundar2115
@poojasundar2115 4 ай бұрын
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?
@iamtitanboi
@iamtitanboi 2 ай бұрын
idk about pdf input but for UI you have to learn front-end development separately.
@Calvinshukla
@Calvinshukla 3 ай бұрын
how am i suppose to access the history?
@Otaku_CAK
@Otaku_CAK 2 ай бұрын
You don't
@EchoesofHeartbreak
@EchoesofHeartbreak 6 ай бұрын
Can you make this gemini able to recognize images, create titles and tags and subjects (metadata), thanks
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
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 6 ай бұрын
@@aarondunn-zt7ev okay, ty
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
I just uploaded my video on Gemini for vision. Check it out here: kzbin.info/www/bejne/jpSwlIF4j8aqd7csi=6p93NAlB6o9DePnz
@abdullahmahir8478
@abdullahmahir8478 3 ай бұрын
error : No module named 'google' but i downloaded all the requirements. can i know the reason?
@mohamedmosad1117
@mohamedmosad1117 6 ай бұрын
great video , thanks for this video
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
Thanks. Happy to hear it was useful.
@RafTFS
@RafTFS 6 ай бұрын
how can you change this to run as a google Cloud Run?
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
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 6 ай бұрын
@@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 5 ай бұрын
You are great man cheers
@aarondunn-zt7ev
@aarondunn-zt7ev 5 ай бұрын
Thanks! I appreciate the comment. Let me know what other content you would like to see.
@havearelax31401
@havearelax31401 5 ай бұрын
@@aarondunn-zt7ev It will be great if you use GEMNI API and made a chatbot, which will use custom datasheet from me.
@techwithsibro
@techwithsibro 6 ай бұрын
Thanks a lot!
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
You’re welcome! Let me know if there is any specific content that you would be interested in seeing.
@parthmahadik6038
@parthmahadik6038 6 ай бұрын
How can we feed it our customised data so that it behaves based on the data and response accordingly
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
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: kzbin.info/www/bejne/maHQY2ueett6d6Msi=qAX6wM0ytI_VSu7v
@karkids
@karkids 5 ай бұрын
What google cloud project for API key
@aarondunn-zt7ev
@aarondunn-zt7ev 5 ай бұрын
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 5 ай бұрын
I choose the generative language client and there is a key error every time
@mohamedashiq8248
@mohamedashiq8248 6 ай бұрын
Hi can we create a customized data and it should answer only for customized data not should answer all the data
@iftekharansari5558
@iftekharansari5558 6 ай бұрын
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 6 ай бұрын
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: kzbin.info/www/bejne/maHQY2ueett6d6Msi=qAX6wM0ytI_VSu7v
@vietdihoc
@vietdihoc 3 ай бұрын
How many requests can you make for each key?
@harshrana3012
@harshrana3012 3 ай бұрын
1500 request as of now
@rryann088
@rryann088 3 ай бұрын
@@harshrana3012 so its free to use and i can get another key if i exceed 1500?
@tawanbaohlopet9034
@tawanbaohlopet9034 6 ай бұрын
How do I add germini with my Facebook page?
@aarondunn-zt7ev
@aarondunn-zt7ev 6 ай бұрын
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!
@Its_Alan_Paul
@Its_Alan_Paul 4 ай бұрын
Is there something wrong wit Audio ?
@Its_Alan_Paul
@Its_Alan_Paul 4 ай бұрын
Nah that was my Laptop.
@brainfulness2189
@brainfulness2189 Ай бұрын
Hi aaron, please contnue the video on how to set it out the chat bot on web site. Also please using additional the pdf file or csv file to add as for additional knowlwdge about say the list of book that say , you want to sell ..hoe to set it out?
@NikhilBajaj-qs2he
@NikhilBajaj-qs2he 28 күн бұрын
Yo can anyone tell me how to get api placeholder url or what thai is
5 Python Libraries You Should Know in 2025!
22:30
Keith Galli
Рет қаралды 83 М.
Create a LOCAL Python AI Chatbot In Minutes Using Ollama
13:17
Tech With Tim
Рет қаралды 138 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Create AI Agents From Scratch With Python! (Free Course)
22:41
Hasan Aboul Hasan
Рет қаралды 78 М.
Should You Adopt Pydantic AI? Deep Dive + Real Use Cases!
52:14
YourTechBud Codes
Рет қаралды 7 М.
host ALL your AI locally
24:20
NetworkChuck
Рет қаралды 1,5 МЛН
Master the Gemini API: A Node.js tutorial with real examples
20:37
Google for Developers
Рет қаралды 44 М.
Эти функции chatGPT навсегда изменят твою жизнь!
18:09
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН