How to Build AI ChatBot Using Google Gemini AI with Custom Knowledge Base
*Build your own, personalized AI assistant, tailored to your specific needs!*
New Video: Build a PDF AI Chatbot • How to Build AI ChatBo...
In this video, I will show you how to build a custom AI chatbot using gemini api that can perform specific tasks based on your use case. While general AI chatbots like ChatGPT, BARD, and Claude are great for answering general knowledge questions, they are not capable of answering specific questions about your business. For example, if you have an ecommerce business, there is no way for these chatbots to help a customer track their order because that requires specific knowledge. By the end of this video, you will be able to create your own personalized AI chatbot that can perform a specific task, whether it’s for your business or other businesses. We will be using Google Gemini API, Node JS, and AI Studio to create our chatbot. I will show you how easy it is to build a custom AI chatbot with the power of Gemini AI.
*No coding wizardry required!* This video breaks down the process into simple steps, making custom AI accessible to everyone.
Github Repo: github.com/codingmoney/coding...
0:00 - Introduction
1:27 - Prerequisites
2:25 - Google AI Studio
4:32 - Prompt Design
6:29 - Chatbot Prototype & Testing
10:07 - Gemini Coding & API Key Setup
13:55 - Custom AI Chatbot Demo
15:44 - Important, Please don’t skip
#aichatbots #geminiai #ai #artificialintelligence #javascript #nodejs #aistudio #googleai
Пікірлер: 157
Updated Video: kzread.info/dash/bejne/aJyFqJppj9uzm7Q.html
This is a lifesaver having my capstone project this semester in my graduate studies as MIT integrating AI in my application. Thank you so much Sir. You are doing great job.
Cool, man. Such interesting and useful information was to the point and easy to understand:) Thanks! I wish you all the best for your channel! You're doing a great job.
@CodingMoney
5 ай бұрын
Thanks man, really appreciated.
damn thanks a lot Google AI studio is kinda underrated ngl!
the video is superinteresting, thank you. I have been working with google dialogflow and search&conversation, where you can create more complex chatbots which can fulfill tasks - but its complicated and timeconsuming to define the chatbot interactions. Google recently introduced "generative agents", where you can define complex interactions just by describing them with prompts (similar to your video, but taking it to the next levels. eg you can define multiple agents for different tasks, working together). The functionality is not yet publicly available though :-(
Thank you, a great idea. I just loved it. I am entering the field of Gen AI and definitely, this project is a great start to read code and familiarize myself. I will learn more skills for optimizing it. Loved the web interface of the chatbot
Thanks for this video mate...
Beautifulily explain! Keep them coming
@CodingMoney
5 ай бұрын
Thank you! More to come.
this video makes it SO easy, even tech toddlers like me can do it)) Sending major virtual hugs and wishing even more awesome tech magic for your beaurtiful channel! ✨❤🦄
@CodingMoney
5 ай бұрын
Lol @ tech toddlers.. many thanks! Really appreciated.
thank you for a simple tutorial
Thanks for the video. Google AI Studio is changing so fast and this video seems to be already being outdated. For example, there is no "Write your prompt examples" pane. There is instead "System Instructions" pane. Anyway, the way training chatbot seems to have changed. Also, I expected to learn how chatbot can be trained with specific knowledges by reading contents from website, but I guess I was wrong. I wonder whether the current technology allows us to build an intelligent chatbot by training it with existing website contents.
Very informative video, keep up the good work!1
Thank you for the video.
Awsome tutorial
Excellent video thank you
Good job sir🫡 I love your videos.
@CodingMoney
5 ай бұрын
I appreciate that!
Can it still search google ask genral questions that bard can answer?
fantastic! any chance of making a Wordpress plugin or just use code snippets?
Thank you very much Coding money for this supper amazing content
Thanks for explaining the concept so well, I wanted to ask can we use this technique to build a domain specific chatbot- like education, Healthcare??
@CodingMoney
2 күн бұрын
Check out my other video better suited for your use case kzread.info/dash/bejne/aJyFqJppj9uzm7Q.html
Thanks. I am trying to make component break-down table about hardware components on the PCB in attached photo using Gemini or other AI multimodal. So the inputs are a prompt text and a PCB image photo. (1) Input is an attached photo and prompt. (2) Output is a break-down table for hardware components contained in the photo. The format of the table column should be, 'Description', 'Manufacturer', 'Part Number', 'Part Image', 'Size' and 'Quantity'. And after many trials, I realized that current Gemini Pro didn't give accurate results(for example, how many Resistors, how many Capacitors, BEADs, What is the chip part name and is it a SoC or Memory) by interpreting the PCB photo. Therefore I think I need to train the AI engine by lots of chip images, resistors, capacitor images. Would you please let me know how I can such training and make custom AI engine? Thanks. Firstly, forget about all the previous conversation history with my account. Can you generate a component break-down table about hardware components on the PCB in the attached photo? Please see below for the detailed requirements: 1. Input is the attached photo. 2. Output is a break-down table for hardware components contained in the photo. The format of the table column should be, 'Description', 'Manufacturer', 'Part Number', 'Part Image', 'Size' and 'Quantity'. 2. 'Description': The description could be one of following things; Semiconductor(CPU=Microprocessor), Semiconductor(GPU), Semiconductor(SoC=system on a chip), Semiconductor(Memory), Semiconductor(FPGA or ASIC), Semiconductor(Analog Chips), Semiconductor(ADC or DAC), Crystal, Oscillator, Resistor, Capacitor, Inductor, BEAD, Common Mode Choke, ESD Protection device, Transformer, Flash memory, Chip Varistor. 2. 'Manufacturer': Please refer to the en.wikipedia.org/wiki/Integrated_device_manufacturers and also to other web pages. 3. 'Part Image': Please cut the specific parts from the attached photo and add them into this 'Part Image' cell. 4. 'Size': the example expression should be A mm x B mm. Please assume that the attached photo size is 150 mm x 100 mm in total.
Really helpful content keep the good work up 👌 and it would be great if you share with us how to use the gemini api with json data or spreadsheets 😊
Very good video. A question: When you download the generated code and add new examples in the Google AI Studio panel, the previously downloaded code has the latest examples or you have to download the code again.
@CodingMoney
5 ай бұрын
Hi Danny, You'll need to download the code again.
@dannyrg428
5 ай бұрын
@@CodingMoney Can you put the bot in WordPress?
thank you very much 👏 friend for the explanation 🤗 Godbless u
@CodingMoney
5 ай бұрын
You're very welcome 🤗
thanks alot
Thank you for your videos! I think the index.js file is missing in your github, since its the main file in your package JSON. Thank you!!
@CodingMoney
18 күн бұрын
Good catch. Server.js is the main file. You can change it in the package.json
Thanks!
Thanks a lot for your work! I'm planning to create a custom AI Chat bot on a website, to help navigating the website better for user that way. As far as I understood your video that should be quite possible that way right?
@CodingMoney
4 ай бұрын
Glad it was helpful! Yes, go for it.
Excellent video. I tried to follow the same steps you explained, but it seems that something changed this week in google ai studio, I cannot see the user/model window in the left side, and I don't know how to proceed... Is it a problem with my interface? Did something change?
@CodingMoney
4 ай бұрын
Let me check
@CodingMoney
4 ай бұрын
Yes you are right the interface has changed a little. Now you can upload your knowledgebase as file or write your prompt as user using the window that is available to you.
@betulakgul3367
2 ай бұрын
@@CodingMoney i cant write on the window
Very powerfull knowledge here :)
how would we make this a nice little chatbot integrated into your site
Can you please compare this with prebuilt commercial chatbots like gpt-trainer?
@CodingMoney
4 ай бұрын
Thanks for your comment. I have noted down your request.
Hi, we want to create a utility ai API bot for our buisness data, we get orders like 12*36 pc-2 vin. and we have to parse it to a json that contain width, height, quantity and its media name, i did training in gemini ai studio, it works good but when i actually convert it to a modal then it doesnt give proper responses? Can you please make a video or it or get in touch with me for this video? I really think many people must be needed this, or having same kind of issues
I really like you video! have you considered making a video on how to make an image generator?
@CodingMoney
4 ай бұрын
Thanks for your comment. I have noted down your suggestion.
I am planning to build a fitness app with react native and supabase as backend can I integrate this to mobile apps as well? I want to add Ai coach that can help you with diet, foods, exercise etc
@CodingMoney
5 ай бұрын
Yes, you can.
I would like to code a chatbot for my university in flutter, how to do it
Than you a lot! but.. Where is the knowledge base?
Nice video, I am building a futuristic chat bot right now. I was thinking if I can capture user data to fine tune the model after every response. How can I accomplish that ?
@CodingMoney
2 ай бұрын
Stay tuned for new videos about that using dialog flow
I watched your entire video, and it's really very helpful. However, I want to create a chatbot for a higher education institution where students, staff, and others can ask questions about the institution (college staff, curriculum, courses, etc.) and the model can respond. This can only be done if the model is fed the correct data, so I used the data from my institution and it worked perfectly as expected. However, I have a ton of data. Is there a way for me to upload my files to the model rather than adjusting to this prompt and following the model's response sequence?
@CodingMoney
4 ай бұрын
Yes, and i have a very good news for you. Their new model gemini 1.5 pro model support 1 million token and you would be able to upload your data as files.
Thanks a lot for this, i feel like a coder now. one question pls, where do find the chat logs of visitors to my site? can you help? I'm not a coder...
@CodingMoney
4 ай бұрын
You'll need to add custom code for that functionality i.e. to store chat logs in a database.
Prefact 🎉❤ Just extend it to chat with pdf/document
Hey ahmad! Great video. I am building a chatbot that should know all traffic laws, if i ask bard about traffic laws, it searches the web for an answer, summaries it, and returns it, can this be achieved with the gemini API? (I cant add the its knowledge base the entire traffic laws because there are too many, the answer has to come from the web) Thank you!
@CodingMoney
5 ай бұрын
What's estimated word count of your knowledge base?
@modiesawi508
5 ай бұрын
@@CodingMoney the entire traffic laws of a whole country, too big, it is not even found in one place
With the chatbot, are you able to handle the widges/cards gemini may send? Like what's the weather in atlanta ga?
@CodingMoney
3 ай бұрын
Yes, you would need to write custom code to handle that.
Thank you so much for your video! Is it possible to integrate the bot into wordpress?
@CodingMoney
3 ай бұрын
Yes, can be integrated with any site. Let me know if you would like a video on that?
Can we use Gemini to train corpus and answer the questions?
@CodingMoney
5 ай бұрын
yes. currently in ai studio there is a 30720 token limit
Im not able to see windows in AI studio only one window where i can chat is available the prompt example window not present for me please help
@CodingMoney
3 ай бұрын
Yes, they recently updated the interface. You don't need the other window anymore. The same thing can be done using the one window that is available. Use the example source code repo I provided in the description
thank you for the video ...is there a way to link our own custom database to this
@CodingMoney
3 ай бұрын
Yes it is possible.
@Moviezoneee794
3 ай бұрын
@@CodingMoney thank you for the response …could you please give me a brief overview of how it can be done using databases like SQL….
In the file server.js, is this line (6) necessary? const dotenv = require('dotenv').config()
@CodingMoney
3 ай бұрын
Yes
how do u display the response in a proper format like in points
@CodingMoney
4 ай бұрын
Can you elaborate?
Thanks, excellent video, I dont have the option to get the code, save in drive or share
@CodingMoney
Ай бұрын
Check out new video kzread.info/dash/bejne/aJyFqJppj9uzm7Q.html
Can you make chatbot RAG based system? Using gemini...
I want to train as per my data set what the word limit it has ? I want to train it in my data set and ask to do the necessary task for me , I want to train as much data set I can Do let me know your thoughts on it is it possible?
@CodingMoney
5 ай бұрын
yes, it is possible. there is a 30720 token limit.
Has anyone built an AI chatbot for a client/ company? If so, I wanted to know if a tool that monitors your AI chatbot for incorrect or dangerous responses and alert the developer and log it when it happens would be useful? Me and my friends had built such a AI monitoring tool for a hackathon and wanted to know it would be helpful for others.
the issue with the gemini is it doesn't allow to build with javascript ,instead it allows only python code for the custom bot
hello , i hope you see my comment . What do i have to change in the code you provided on github so that the response of the chatbot is about mine and not coding money . i changed the api_key but it always reponds as coding money chatbot.
@CodingMoney
20 күн бұрын
Modify the history parameter. Line 39 in the code.
how i can also provide some pdfs along with the website to the ai for gathering information from that???????????
@CodingMoney
2 ай бұрын
You can do this using the AI studio.
Wich model is cheaper? Gemini or GPT?
@CodingMoney
4 ай бұрын
Gemini is cheaper and easier to work with.
@juniorm.4536
4 ай бұрын
Amazing! Thanks @@CodingMoney
I copied the code as you said(python), and pasted it in my IDE. When i tried connecting to the tuned model, its saying permission not given. And proceeds to suggest setting up some kind of authorization (Oauth) and stuff.
@CodingMoney
2 ай бұрын
Did you create and provide API key?
When I click on create new chat prompt, I only see one box that says "Chat" at the top, and then a space where I can type a prompt and see the reply. I do not have a place that says write your prompt examples here. Has anyone else run into this?
@CodingMoney
3 ай бұрын
Yes, the interface slightly changed. You can proceed same procedure with just the one box.
Hi, great video but I'm failing to find the 'Write your prompt examples' column. Please help
@CodingMoney
4 ай бұрын
The interface has slightly changed. Now you get only 1 box where you can also write your prompt examples in the same box.
@zackhiroki7679
3 ай бұрын
@@CodingMoney Oh I see, thank you then😊
@zackhiroki7679
3 ай бұрын
Can you create a video like this but for integrating it in a python code, not just on a website? Please🙏@@CodingMoney
@zackhiroki7679
3 ай бұрын
And can I integrate this chatbot into my chemistry app? somebody please reply
can i embed this chatbot in my website?
@CodingMoney
5 ай бұрын
Sure, you can. What tech stack are you using on your website?
WHEN WE ENTER 1 IN INPUT IT GETS ERROR HOW TO RESOLVE IT
@CodingMoney
5 ай бұрын
Whats the error message that you get?
"Get Code is currently not available for this model" i'm unable to generate code please help me 😪
@CodingMoney
2 ай бұрын
Check my github repo.
hi. please help me. how to create custom model from many pdfs in Persian language? tank you.
@CodingMoney
3 ай бұрын
It is same procedure. Now you have the option to upload pds and files.
@mohsenghafari7652
3 ай бұрын
@@CodingMoney tanks . gemini support the Persian language ?
pls make video for custom ai chatbot
@CodingMoney
3 ай бұрын
I have already made that video and you commented on it
Sir can you please create a detail video on how to integrate it on website. I am trying with your code, but nothing is happening :(
@CodingMoney
Ай бұрын
Yes Check out my new video: kzread.info/dash/bejne/aJyFqJppj9uzm7Q.html
@anishsambhwani
Ай бұрын
@@CodingMoney Actually i want to create a website that only has this chatbot on the home screen. I want exactly what you have shown in the above video, but this code is showing error. Can you please make a tut upto the final step of integration. I am a bit new in this that's why 🥲
@CodingMoney
Ай бұрын
@@anishsambhwani what error are you getting? Did you try my github repo?
@anishsambhwani
Ай бұрын
@@CodingMoney Yes i tried it. When i am adding my api key then hosting all the files on tinny host, the front face is loading but when I am entering any text and pressing enter, nothing happens. Also the Server.js has your own trained model's history in it.
Where did you source or upload a knowledge base in this video? "Google Gemini AI with Custom Knowledge Base"
@CodingMoney
3 ай бұрын
The prompt allows you to upload a custom knowledgebase upto 32k+ tokens. The new interface allows for file and pdf document uploads. The window where I wrote my prompt that's where you can include your knowledgebase.
❤❤❤❤❤❤❤ 😊😊😊😊😊
Is the bot free to use?
Sorry... I see now that you are getting the API key from the an environment variable... hmm...
I followed your video and integrate its API in my code but It didn't work. It was working fine when I tested it in Google AI Studio but when I tested it with my code it didn't work.
@CodingMoney
4 ай бұрын
Did you try to use my code from the github repository as template? It is very hard to troubleshoot if you dont provide more details on the error message etc..
@Firaaskhn
4 ай бұрын
@@CodingMoney When I am using Gemini in my code and asking random questions, it is giving me right answers. But when I am questioning based on the prompts that I used during the training, it is not giving me the correct answers. However, when I am testing Gemini in Google AI studio it is working fine.
@CodingMoney
4 ай бұрын
@@Firaaskhn Can you check and read the code to make sure your prompt is in the chat history section? if not, copy it over from the google ai studio.
@Firaaskhn
4 ай бұрын
@@CodingMoney Can you make a tutorial video of Gemini using python? It would be really helpful.
code can not run
@CodingMoney
5 ай бұрын
Do you have all the prerequisites installed?
Coding money ❤️
Is it free sir? or it has limit?
@CodingMoney
Ай бұрын
It is Free within limits. But if you want to deploy for production check update pricing.
Sir is the Gemini api paid ?
@CodingMoney
23 күн бұрын
Gemini API has both free and paid tiers. Paid models include Gemini 1.5 Flash, Gemini 1.5 Pro, and Gemini 1.0 Pro. Other models may be free, but a billing account is still required. For more information, visit: ai.google.dev/gemini-api/docs/billing
Thank you Coding money.
No one asking how we can get a sample prompt
@CodingMoney
Ай бұрын
Can you elaborate?
@dominic_ot
Ай бұрын
Yunno you actual have to give system instructions, like tuning the model, which of course you gave yours and I was wondering if there's a sample but no need, I created one myself...and I also found out that the studio has a prompt gallery using the AI studio in May 2024 is a little difference from yours...the interface is different especially that we can now use 1.5 Flash so I understand
@CodingMoney
Ай бұрын
I have also included github repo incase you need it.
3 times I watch slowly this video and I can't make it. This is for coders not for everybody
@CodingMoney
Ай бұрын
Check out my new video is for every body: kzread.info/dash/bejne/aJyFqJppj9uzm7Q.html
why your voice sounds like ai generated?
@CodingMoney
4 ай бұрын
If you mean only the tutorial part? It's because I sped it up a little to save viewer's time. Is that the reason you think it is AI generated? Or something else?
@yashraj.10
4 ай бұрын
@@CodingMoney no, the whole video.. you sound & words feels too perfect and synchronised lol, feels like reading a straight article or something.. and all your vocals sounds like ai generated once
@mojeshmarella4171
4 ай бұрын
We are experiencing existential crises😅
@renubiswas6355
2 ай бұрын
1n😢
coding money
Coding Money
Learning AI from AI?😂😂😂
how to integrate chatbot on a website ?
@CodingMoney
4 ай бұрын
Just paste the code on your website ;)
Coding money ❤
Coding Money