You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.11/site-packages/pydantic/_internal/_std_types_schema.py:291: UserWarning: Pydantic serializer warnings:
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
Expected `enum` but got `int` - serialized value may not be as expected
v = handler(item, index)
The text was updated successfully, but these errors were encountered:
The root of this issue lies in the mismatch between how SQLAlchemy and Pydantic handle enum values:
Pydantic expects to work with the ChatVisibility enum itself.
SQLAlchemy stores the enum as an integer (SmallInteger) in the database.
When fetching values from the database, SQLAlchemy provides raw integers (0 or 1), which leads to warnings during serialization because Pydantic requires the ChatVisibility enum type.
The text was updated successfully, but these errors were encountered: