TypedDict
in google.genai.types
causes Pydantic error on Python <3.12
#189
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Steps to reproduce
Problem Description
I find problem when I try to use TypedDict class from google.genai.types with Pydantic model in Python version less than 3.12. Pydantic show error because it need
typing_extensions.TypedDict
nottyping.TypedDict
for Python version under 3.12.I think solution is change TypedDict import in google.genai.types from
typing.TypedDict
totyping_extensions.TypedDict
. But types.py is auto-generated file, so I cannot change directly.I try to fix code generator but I cannot find build manual or code generator source code.
This problem happen to everyone who use
TypedDict
class fromgoogle.genai.types
with Pydantic in Python version under 3.12. Please fix code generator.Thanks!
The text was updated successfully, but these errors were encountered: