You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the sample code but it keeps raising Unauthenticated error. Using the gemini-1.0-pro works just fine on text.
Unauthenticated: 401 Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
How can I set the authentication in OAuth 2? I had set up and copy the API key but don't know where to put it. Thanks for any help.
Code I used:
gemini_pro_vision_model=GenerativeModel("gemini-1.0-pro-vision")
response=gemini_pro_vision_model.generate_content([
"What is in the video? ",
generative_models.Part.from_uri("gs://youtube-videos/sample.mp4", mime_type="video/mp4"),
], stream=True)
forchunkinresponse:
print(chunk.text)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using the sample code but it keeps raising
Unauthenticated
error. Using thegemini-1.0-pro
works just fine on text.How can I set the authentication in OAuth 2? I had set up and copy the API key but don't know where to put it. Thanks for any help.
Code I used:
Beta Was this translation helpful? Give feedback.
All reactions