google-gemini / generative-ai-python

The official Python library for the Google Gemini API
https://pypi.org/project/google-generativeai/
Apache License 2.0
1.5k stars 297 forks source link

AttributeError #607

Open Sajal-26 opened 3 hours ago

Sajal-26 commented 3 hours ago

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 commented 3 hours ago

Hello @Sajal-26 , What version you have ?

Can you try updating:

pip install -U google-generativeai
Sajal-26 commented 2 hours ago

@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://github.com/google-gemini/generative-ai-python@imagen
Gunand3043 commented 1 hour ago

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

You might need to restart the session after installing.