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.18k stars 226 forks source link

It appears as though `helper_types` is not included in the types file in the `v0.5.4` tag, but exists in `main` #358

Open homer6 opened 1 month ago

homer6 commented 1 month ago
          Oh, it looks like `helper_types` is not included in the types file:
cannot import name 'helper_types' from 'google.generativeai.types' (/opt/venv/lib/python3.10/site-packages/google/generativeai/types/__init__.py)

@markmcd

Originally posted by @homer6 in https://github.com/google-gemini/generative-ai-python/issues/335#issuecomment-2128390402

mayureshagashe2105 commented 1 month ago

Please note that the main branch is unstable. helper_types was added in #297 which was post v0.5.4. This should be available in future releases.

refer to the change-log here: v0.5.4...main

homer6 commented 1 month ago

I see that #341 is in that release. I was trying to use that feature, which appears to require helper_types.

Example: https://github.com/MarkDaoust/generative-ai-python/blob/a3cfdde4b08bce67371a56b0d38723eb9421e413/tests/test_generative_models.py#L1291