Build an AI Chatbot Application using Google Gemini with Flutter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hey everyone so here is my flutter application I have two Modes in my flutter application the one is text based and the another one is image based particularly in that image based level if you upload that some uh UI design related thing like layout related things so it will be provided that what we expect the code so that full code it will be uh provided by the Gemini actually and the text based so if you ask any kind of queries so it will be immediately will it return actually so that is what in that application will do so don't skip that video we'll make the flutter application with the Google Gemini together alright the first thing to use the Gemini API you will need an API key for accessing the Gemini API models actually so if you don't have already one create a new API key from the Google AI Studio and get a new key and implement in your code alright let's initialize the Flutter with gemini depending on the Fluttergemini package you can Run this comment Flutter Pub add on the Fluttergemini so the package will create and then we'll start that code part for initialisation you must call the init constructor for the Fluttergemini in the main function actually so here is the code so after that you can create your instance let's create stream generate content function actually so when user provider that user prompt that mean the questions in the screen so that values we need to pass through this function and that function will extend to the Google API that API will process and it will return that some response actually so if the response is successful we will be printing in the console otherwise we will return that error actually so this is what we did in the function on the next thing in that function we'll be applying that type animation Widget and we'll see to implement typing animation you can use that Gemini response type for widget actually the Germany response type for widget allows you to present your search result using your typing animation all without needs that utilise that set set function actually so like this I mentioned that code below text only input this future lets you perform natural language processing like NLP task such as text Completion and summarisation like that actually so in that I can just call the Gemini instance and in that from the Gemini instance to I can call the text to function so in that I can just pass that my prompt right here story about that's a magic backpack or you can pass that any user prompt from that flutter you are actually so alright so once this text is sent to the Gemini APA and it will be generated the content after that if no errors happens then it will be returned that response if any errors occurs then it will be returned that error actually so this is all about this code the next thing text and image input if the input contains both text and image you can send your text prompt with an image to the Gemini Pro Vision model to perform your vision related task for example I just show that in my output so I can just simply attach my image along with that so what is the picture like that so immediately it will be returned that so what is inside the picture and exactly what we expect the results so that results we will getting from that Gemini API actually so here's the sample snippet for that text and image inputs actually so in that I can just call the Gemini instance along with I can call the text and image function actually so in that I can send a text to prompt what is this picture along with that image so if the both will be sent to the Gemini API and once it's processed it will be returned that response actually so if that input is valid then we'll be alert to that if anything happens here is Occurs so at that time we'll be written that here is for that actually so this is some sample snippet for your reference when using the long prompts it might be useful to count tokens before sending any content to the model actually if you get your model C U R L the APA uses the get method to return the information about the model such as version display name input token limit etc etc if you need to get the models directory it uses the list method to list of all the models available through the API including the both Gemini and palm family models also alright so this is my final output for my all the pages like text based and image based like that actually and I attached the complete that code base so in my GIT so that GIT Repo link I added in the description below so you can take the code and you can play with whatever you want actually so it's up to guys actually so hope you guys you really like that video if you really like that video please subscribe my channel for more videos like this in the future and also if you have any queries or comments please leave them in the comment section below I'm happy to respond and we'll see you on the next video thank you bye
Info
Channel: intellisenseAI
Views: 3,971
Rating: undefined out of 5
Keywords: gemini ai tutorial, gemini tutorial, gemini ai tutorial for beginners, how to use google gemini ai, how to get started with gemini ai, gemini ai crash course, how to use gemini google, google gemini, google ai gemini, gemini ai google, what is gemini ai, gemini pro for text, how to use gemini ai, gemini google, gemini pro vision, how to use gemini, google bard, gemini flutter, fluttergemini, flutter gemini, gemini ai, flutter ai, flutter, flutter_ai, gemini, babakcode
Id: clwtjGtbCPY
Channel Id: undefined
Length: 5min 22sec (322 seconds)
Published: Fri Jan 26 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.