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

AttributeError #607

Closed
Sajal-26 opened this issue Oct 17, 2024 · 5 comments
Closed

AttributeError #607

Sajal-26 opened this issue Oct 17, 2024 · 5 comments

Comments

@Sajal-26
Copy link

Sajal-26 commented Oct 17, 2024

Description of the bug:

module 'google.generativeai.protos' has no attribute 'DynamicRetrievalConfig'. Did you mean: 'SemanticRetrieverConfig'?

I'm getting this error in the import line

import google.generativeai as genai
@Hamza-nabil
Copy link
Contributor

Hello @Sajal-26 , What version you have ?

Can you try updating:

pip install -U google-generativeai

@Sajal-26
Copy link
Author

@Hamza-nabil I'm using the 0.7.2 version of the module, since the updated versions have the problem with the function calling. And this version is working totally fine without any errors. But the one I specified the error was the module with imagen. Probably the version - 0.8.2

I installed it by the following command

pip install -U git+https:/google-gemini/generative-ai-python@imagen

@Gunand3043
Copy link

Hi @Sajal-26 , I tried with the above installation command you shared and it work.

You might need to restart the session after installing.

@Sajal-26
Copy link
Author

Thanks @Gunand3043 Now there's a different error!

raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.NotFound: 404 models/imagen-3.0-generate-001 is not found for API version v1beta, or is not supported for predict. Call ListModels to see the list of available models and their supported methods.

Maybe is it because it is not available with my API_Key?

@Hamza-nabil
Copy link
Contributor

@Sajal-26 I think that why , see Generate images using Imagen 3

Preview: Imagen 3 in the Gemini API is available as an early access release in private preview. It's not yet generally available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants