Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Gemini Pro - NO API Configuration #138

Closed
michsiu opened this issue Jan 17, 2024 · 7 comments
Closed

[BUG] Gemini Pro - NO API Configuration #138

michsiu opened this issue Jan 17, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@michsiu
Copy link

michsiu commented Jan 17, 2024

Found a bug? Please fill out the sections below. 👍

There should be a API configuration for Gemini Pro "apis" file

Describe the bug

On the official doc, there should be a API configuration for Gemini Pro before run Gemini, like this

GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')
genai.configure(api_key=GOOGLE_API_KEY)

image

But there is no this step on the self-operating-computer
image
After added the API configuration, it works now

Another Bug About API Configuration

As I searched on google generativeai issue on GitHUb, it notes that it would be better add transport='rest' on API configuration of Gemini Pro
So, the correct code should be
genai.configure(api_key=YOUR_GOOGLE_API_KEY,transport='rest')

@michsiu michsiu added the bug Something isn't working label Jan 17, 2024
@joshbickett
Copy link
Contributor

@michsiu thank you for reporting. I'll take a closer look

@sangeet000007
Copy link

can it run completely without openai api key?
i added
GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')
genai.configure(api_key=GOOGLE_API_KEY,transport='rest')
but its still asked to set open ai key after setting null api key it enter into the software but returns "Gemini Invalid model"
should i add authorize credentials for a desktop application and i followed all the steps and got the json file but i dont know where to set those credentials and there is no tutorial in readme so kindly any one provide proper tutorial to work with gemini only.

@joshbickett
Copy link
Contributor

@michsiu I can confirm that this .configure appears to fix the issue. I am working on a branch to fix this and will merged once ready

@joshbickett
Copy link
Contributor

@sangeet000007 you should be able to run the gemini-pro-vision model without an OpenAI key saved. You'll only need a Google key. I just fixed some issues with the config of these keys. I think it should be working correctly. Let me know if you have any issues

@joshbickett
Copy link
Contributor

@michsiu I added genai.configure(api_key=GOOGLE_API_KEY) as you suggested and it appears that gemini-pro-vision is now working as expected. Could you try the newest version and let me know if it works for you?

@sangeet000007
Copy link

its working
the click of button is not quite good with gemini it cant even send mails i suggest to improve gemini models with techniques like Set-of-Mark Prompting gpt-4 and also give support for open source models
Thank you.

@michsiu
Copy link
Author

michsiu commented Jan 21, 2024

Thanks @joshbickett ,it works

@michsiu michsiu closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants