How to Build AI ChatBot Using Google Gemini AI with Custom Knowledge Base
HTML-код
- Опубликовано: 29 июн 2024
- *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
Updated Video: ruclips.net/video/6hQF80_xMkQ/видео.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.
Thanks man, really appreciated.
damn thanks a lot
Google AI studio is kinda underrated ngl!
Very informative video, keep up the good work!1
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
Beautifulily explain! Keep them coming
Thank you! More to come.
Thanks for this video mate...
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! ✨❤🦄
Lol @ tech toddlers.. many thanks! Really appreciated.
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 for a simple tutorial
Awsome tutorial
Thank you for the video.
Excellent video thank you
Good job sir🫡 I love your videos.
I appreciate that!
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 😊
Thank you very much Coding money for this supper amazing content
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.
thank you very much 👏 friend for the explanation 🤗 Godbless u
You're very welcome 🤗
Very powerfull knowledge here :)
Thanks!
fantastic! any chance of making a Wordpress plugin or just use code snippets?
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??
Check out my other video better suited for your use case ruclips.net/video/6hQF80_xMkQ/видео.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.
thanks alot
I really like you video! have you considered making a video on how to make an image generator?
Thanks for your comment. I have noted down your suggestion.
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!!
Good catch. Server.js is the main file. You can change it in the package.json
Can it still search google ask genral questions that bard can answer?
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?
Glad it was helpful! Yes, go for it.
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.
Hi Danny, You'll need to download the code again.
@@CodingMoney Can you put the bot in WordPress?
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
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?
Let me check
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.
@@CodingMoney i cant write on the window
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
Yes, you can.
how would we make this a nice little chatbot integrated into your site
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?
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.
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 ?
Stay tuned for new videos about that using dialog flow
Can you please compare this with prebuilt commercial chatbots like gpt-trainer?
Thanks for your comment. I have noted down your request.
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...
You'll need to add custom code for that functionality i.e. to store chat logs in a database.
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
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
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?
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!
What's estimated word count of your knowledge base?
@@CodingMoney the entire traffic laws of a whole country, too big, it is not even found in one place
❤❤❤❤❤❤❤ 😊😊😊😊😊
Thank you so much for your video! Is it possible to integrate the bot into wordpress?
Yes, can be integrated with any site. Let me know if you would like a video on that?
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.
With the chatbot, are you able to handle the widges/cards gemini may send? Like what's the weather in atlanta ga?
Yes, you would need to write custom code to handle that.
the issue with the gemini is it doesn't allow to build with javascript ,instead it allows only python code for the custom bot
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?
yes, it is possible. there is a 30720 token limit.
thank you for the video ...is there a way to link our own custom database to this
Yes it is possible.
@@CodingMoney thank you for the response …could you please give me a brief overview of how it can be done using databases like SQL….
Thanks, excellent video, I dont have the option to get the code, save in drive or share
Check out new video ruclips.net/video/6hQF80_xMkQ/видео.html
Can we use Gemini to train corpus and answer the questions?
yes. currently in ai studio there is a 30720 token limit
In the file server.js, is this line (6) necessary? const dotenv = require('dotenv').config()
Yes
Can you make chatbot RAG based system? Using gemini...
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.
Did you create and provide API key?
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.
Modify the history parameter. Line 39 in the code.
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?
Yes, the interface slightly changed. You can proceed same procedure with just the one box.
how do u display the response in a proper format like in points
Can you elaborate?
how i can also provide some pdfs along with the website to the ai for gathering information from that???????????
You can do this using the AI studio.
Hi, great video but I'm failing to find the 'Write your prompt examples' column. Please help
The interface has slightly changed. Now you get only 1 box where you can also write your prompt examples in the same box.
@@CodingMoney Oh I see, thank you then😊
Can you create a video like this but for integrating it in a python code, not just on a website? Please🙏@@CodingMoney
And can I integrate this chatbot into my chemistry app? somebody please reply
Wich model is cheaper? Gemini or GPT?
Gemini is cheaper and easier to work with.
Amazing! Thanks
@@CodingMoney
can i embed this chatbot in my website?
Sure, you can. What tech stack are you using on your website?
"Get Code is currently not available for this model" i'm unable to generate code please help me 😪
Check my github repo.
pls make video for custom ai chatbot
I have already made that video and you commented on it
Is the bot free to use?
WHEN WE ENTER 1 IN INPUT IT GETS ERROR HOW TO RESOLVE IT
Whats the error message that you get?
Where did you source or upload a knowledge base in this video? "Google Gemini AI with Custom Knowledge Base"
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.
hi. please help me. how to create custom model from many pdfs in Persian language? tank you.
It is same procedure. Now you have the option to upload pds and files.
@@CodingMoney tanks . gemini support the Persian language ?
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.
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..
@@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.
@@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.
@@CodingMoney Can you make a tutorial video of Gemini using python? It would be really helpful.
Sorry... I see now that you are getting the API key from the an environment variable... hmm...
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 :(
Yes Check out my new video: ruclips.net/video/6hQF80_xMkQ/видео.html
@@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 🥲
@@anishsambhwani what error are you getting? Did you try my github repo?
@@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.
Coding money ❤️
code can not run
Do you have all the prerequisites installed?
Is it free sir? or it has limit?
It is Free within limits. But if you want to deploy for production check update pricing.
Sir is the Gemini api paid ?
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
Can you elaborate?
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
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
Check out my new video is for every body: ruclips.net/video/6hQF80_xMkQ/видео.html
coding money
why your voice sounds like ai generated?
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?
@@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
We are experiencing existential crises😅
1n😢
Coding Money
Learning AI from AI?😂😂😂
how to integrate chatbot on a website ?
Just paste the code on your website ;)
Coding money ❤
Coding Money