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 genai.list_models(): TypeError: Model.__init__() got an unexpected keyword argument 'max_temperature' #426

Closed
dockhardman opened this issue Jul 3, 2024 · 8 comments
Assignees
Labels
component:python sdk Issue/PR related to Python SDK type:bug Something isn't working

Comments

@dockhardman
Copy link

dockhardman commented Jul 3, 2024

Description of the bug:

Environment

google-ai-generativelanguage-0.6.6
google-generativeai-0.7.1

Reproduce Error

# test_script.py
import google.generativeai as genai

genai.configure()
list(genai.list_models())

Raise Error

Traceback (most recent call last):
  File "/Users/me/test_script.py", line 4, in <module>
    list(genai.list_models())
  File "/Users/me/miniconda3/envs/gls/lib/python3.10/site-packages/google/generativeai/models.py", line 206, in list_models
    yield model_types.Model(**model)
TypeError: Model.__init__() got an unexpected keyword argument 'max_temperature'

Workaround

Constrained version google-generativeai!=0.7.1.

@pseudotensor
Copy link

Same problem, unsure why just started since python packages didn't change, seems issue with google endpoint itself.

pseudotensor added a commit to h2oai/h2ogpt that referenced this issue Jul 3, 2024
@singhniraj08
Copy link

@dockhardman, Thank you for reporting this issue. genai.list_models() is broken in 0.7.1 and I was able to replicate it. Meanwhile we are fixing the issue, you can using generative-ai-python 0.7.0 release.

@singhniraj08 singhniraj08 added type:bug Something isn't working status:triaged Issue/PR triaged to the corresponding sub-team component:python sdk Issue/PR related to Python SDK labels Jul 4, 2024
@chenin-wang
Copy link

Same problem

TCLee added a commit to TCLee/extraction that referenced this issue Jul 5, 2024
@maomihz
Copy link

maomihz commented Jul 7, 2024

+1

@maomihz
Copy link

maomihz commented Jul 7, 2024

Workaround, downgrade until they fix the issue in 0.7.1

pip install google-generativeai==0.7.0

@MarkDaoust
Copy link
Collaborator

Shoot! thanks for the report everyone. I'll try and get this fixed today.

@MarkDaoust
Copy link
Collaborator

A workaround to use 0.7.1 in the meantime is to install google-ai-generativelanguage==0.6.5.

@MarkDaoust
Copy link
Collaborator

This is fixed in the 0.7.2 release.

@github-actions github-actions bot removed the status:triaged Issue/PR triaged to the corresponding sub-team label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python sdk Issue/PR related to Python SDK type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants