self-operating-computer icon indicating copy to clipboard operation
self-operating-computer copied to clipboard

Parsing error, I don't know if my Gemini-pro API credentials have problem

Open TheoneThefool opened this issue 1 year ago • 6 comments

2 I'm a newbie, please help : ) and I‘m really interested in this project :D

TheoneThefool avatar Dec 27 '23 08:12 TheoneThefool

Hi @TheoneThefool,

Could you please provide more details about the issue you're facing? It will help me understand whether it's a credential issue or a bug.

Thanks!

Yash-1511 avatar Dec 31 '23 10:12 Yash-1511

Hi @Yash-1511 , I don't know how to lookup for more details, that is all errors I can see in the git bash. Could you please show me how to check that ? Thank you for your help !

TheoneThefool avatar Jan 01 '24 02:01 TheoneThefool

Hi @Yash-1511 . I seem to recall the credential error in the following step ↓ 20240101113032 20240101113024 Thanks!

TheoneThefool avatar Jan 01 '24 03:01 TheoneThefool

Hello @TheoneThefool ,

First please follow the link to create your Google API key for Gemini Pro Vision. The process is straightforward.

Once you have your API key, proceed by cloning the repository and following the installation instructions. Then, add your API key to the .env file.

To test if your API is functioning correctly, you can use the following sample request:

curl \
  -H 'Content-Type: application/json' \
  -d '{"contents":[{"parts":[{"text":"Write a story about a magic backpack"}]}]}' \
  -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY

Make sure to replace "YOUR_API_KEY" with the actual API key you obtained.

This process should help you get started with Gemini Pro Vision more effectively. If you have any questions or need further assistance, feel free to ask.

Yash-1511 avatar Jan 01 '24 13:01 Yash-1511

Thank you @Yash-1511 , My API can be invoked successfully, but my google-generativeai version is 0.3.2 and SOC requires 0.3.0 dose this matter? Screenshot (42)

TheoneThefool avatar Jan 02 '24 03:01 TheoneThefool

Same issue, and this link helps https://github.com/google/generative-ai-python/issues/117

michsiu avatar Jan 17 '24 03:01 michsiu