Hi, thank you for your explanation. I have to upgrade my Python version from 3.8 to 3.10 because I got an error that said: "AttributeError: module 'google.generativeai' has no attribute 'GenerativeModel"
I want to create an ai voice assistant. I have already done most of the logic. But my assistant lacks any humour, reply style and things like that. I want to give it a certain 'personality'. I want to model it like Jarvis from iron man movies, but with a bit more humour. Is there any way to do that ? Can we model it by editing its replies in the api webpage and using the code in python (I am using pycharm) ? Thanks for replying
Yeah you can check if gemini api has an system message options or else you can just add it along with the input prompt or chat history saying it needs to be more humorous
@@unitedtoptech6288 ok thank you so much. I have one more question, in the api, when we interact with the model, we can edit its response too. Does it have anything to do with moulding the personality ?
Yeah maybe try giving different personalities of input prompts and choose the one you want and make sure that you add that specific input phrase with chat history
genai.configure(api_key=os.environ["my key shows here"]) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 714, in __getitem__ KeyError: 'my key shows here' i got this type of key error
So this example works for 1 article that returns that article via a command prompt. Does anyone want to share some code that would loop through a list of prompts and generate many articles in txt files? Or, how else would you use this?
Please help me. I'm doing everything as shown but in vs code i dont get the output i want it keeps saying, YOUR_RESPONSE_TEXT. I have changed the convo.send.message to what i want ("what is meaning of ai"). It should answer this prompt but it doesn't it keeps saying YOUR_RESPONSE and YOUR_MODEL_OUTPUT. it's not answering any prompt i fill there. Please please help. I have copied as it is code from Google in python (vscode) and also the api key is perfectly generated and inserted.
@@unitedtoptech6288 I'm glad you replied. But thanks to Gemini itself, I could find the problem and the program is perfectly working! Thanks a lot for your video it was very helpful and clear concise. Keep creating this informative ai related videos thx again
Did you install 'pip' and/or create the api from the gemini panel? I would start by creating a new api key and installing the pip package mentioned in the video.
Search for chat history in the documentation, you just need to add the pervious questions and answers to that list, for making it as a chat bot you can just have an infinite while loop with some terminating condition
When i run it in the terminal it is showing genai.configure(api_key=os.environ["AIzaSyAu1YlUXLGxNYxFNl0kiNDCHYt9-OgQSSs"]) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 685, in __getitem__ KeyError: 'AIzaSyAu1YlUXLGxNYxFNl0kiNDCHYt9-OgQSSs'
Hi, thank you for your explanation. I have to upgrade my Python version from 3.8 to 3.10 because I got an error that said: "AttributeError: module 'google.generativeai' has no attribute 'GenerativeModel"
Ohh thanks for the info
Thanks for this 🙌. But is it free to use? or is there a limit which exceeds??
As of now it is free to use and I didn't find any tab to know the usage also
How do i give a different personality?
Should i use the system message option?
what do you mean by personality?
I want to create an ai voice assistant. I have already done most of the logic. But my assistant lacks any humour, reply style and things like that. I want to give it a certain 'personality'. I want to model it like Jarvis from iron man movies, but with a bit more humour. Is there any way to do that ? Can we model it by editing its replies in the api webpage and using the code in python (I am using pycharm) ?
Thanks for replying
Yeah you can check if gemini api has an system message options or else you can just add it along with the input prompt or chat history saying it needs to be more humorous
@@unitedtoptech6288 ok thank you so much. I have one more question, in the api, when we interact with the model, we can edit its response too. Does it have anything to do with moulding the personality ?
Yeah maybe try giving different personalities of input prompts and choose the one you want and make sure that you add that specific input phrase with chat history
thanks so much. this video has been very helpful and easy to follow. And it works perfectly👍
Glad it helped! welcome
genai.configure(api_key=os.environ["my key shows here"])
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 714, in __getitem__
KeyError: 'my key shows here'
i got this type of key error
You need to add your api key in that "your key shows here" placeholder
So this example works for 1 article that returns that article via a command prompt. Does anyone want to share some code that would loop through a list of prompts and generate many articles in txt files? Or, how else would you use this?
So you mean you want to input multiple times till you say stop? You can use an infinite while loop in python and terminate it based upon your input
how does the chat history get saved? or do we have to add it manually?
You need to add it manually, check the documentation you will have code for that too
Does it support the image also like uploading the xray image to describe it
You need to use gemini pro vision model for that with input image
Hello there, I am getting KeyError(key) in the API key line
Did you add the key ?
@@unitedtoptech6288 I do get the same. Yes, I added the key. If you found out, please share.
Yes I added the key and tried many times, I was getting the same error and hence shifted to openai which worked fine.
@@samarthamj4619 Remove os.env. Give api key straight away
did you try it?
how can u run the program? the thing is it doesnt print me anything when i run it, why is that?
go the path where your .py file is present in terminal and type python filename.py to run it
@@unitedtoptech6288 thank uuu!!! It worked :)
@@unitedtoptech6288Thank u!!! It worked :)
thank u!! It worked :)
Glad to know that!
How much is the maximum usage or maximum range?
as of now I think there is no usage limit
Please help me. I'm doing everything as shown but in vs code i dont get the output i want it keeps saying, YOUR_RESPONSE_TEXT.
I have changed the convo.send.message to what i want ("what is meaning of ai").
It should answer this prompt but it doesn't it keeps saying YOUR_RESPONSE and YOUR_MODEL_OUTPUT. it's not answering any prompt i fill there. Please please help.
I have copied as it is code from Google in python (vscode) and also the api key is perfectly generated and inserted.
can you please paste your code?
@@unitedtoptech6288 I'm glad you replied. But thanks to Gemini itself, I could find the problem and the program is perfectly working! Thanks a lot for your video it was very helpful and clear concise. Keep creating this informative ai related videos thx again
Glad it worked for you!! Thanks for your nice words
Did you install 'pip' and/or create the api from the gemini panel? I would start by creating a new api key and installing the pip package mentioned in the video.
You mean pyton pip? it gets auto installed whenever you install python
Thereafter this, how do we go around modifying the chatbot to our needs
just plug it with frontend and get prompts or with any other backend code but this is the base
How can you use this on Google cloud Run?
Try checking for google vertex gemini ai
google's gemini ai api with java spring boot. i structed to add which dependency in my project
I have done that already
@@unitedtoptech6288 where is video bro
@@unitedtoptech6288 explain what are dependency are use ?
check the playlist
Please tell me how long will it works properly for free
Not sure, depends on Google's announcements
Hello Bro, I need to store the chat session and use it like a bot, can you help me how can I do that
You mean you want to store the previous chat history too?
@@unitedtoptech6288 yes rite, and want to make this as a chatbot
Search for chat history in the documentation, you just need to add the pervious questions and answers to that list, for making it as a chat bot you can just have an infinite while loop with some terminating condition
Which python version you have
I guess I used 3.10
@@unitedtoptech6288 its not working from my side I use 3.9.5, do I have to update my python version?
Yeah try using a 3.10 or 3.11 version, btw what error are you getting?
When i run it in the terminal it is showing
genai.configure(api_key=os.environ["AIzaSyAu1YlUXLGxNYxFNl0kiNDCHYt9-OgQSSs"])
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 685, in __getitem__
KeyError: 'AIzaSyAu1YlUXLGxNYxFNl0kiNDCHYt9-OgQSSs'
The way you have added your API key is wrong, just assign it to the api_key variable
@@unitedtoptech6288 How will i do that?
You want to use the api key in env variable or directly assign?
@@unitedtoptech6288 Directly assign
i have done that in the video
thanks bro❤
Welcome 😊
can you do a tutorial on how to send images to it
Yeah I have done it
Where can i get code???
You can find in the documentation
This free as of today?
yes
Thank you lol
welcome, why u laugh?
Is this free?
yes