-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
SDK Version (required)
Provide the version you are using.
❯ python
Python 3.11.4 (main, Feb 2 2024, 19:01:43) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cohere
/user/home/.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
* 'allow_population_by_field_name' has been renamed to 'populate_by_name'
* 'smart_union' has been removed
warnings.warn(message, UserWarning)
>>> print(cohere.__version__)
5.8.0
>>> import pydantic
>>> pydantic.VERSION
'2.8.2'
Describe the bug
I am getting this warning while trying to use the library.
.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
* 'allow_population_by_field_name' has been renamed to 'populate_by_name'
* 'smart_union' has been removed
warnings.warn(message, UserWarning)
This warning is triggering from the code below:
cohere-python/src/cohere/core/pydantic_utilities.py
Lines 85 to 90 in 5402078
class UniversalBaseModel(pydantic.BaseModel): class Config: populate_by_name = True smart_union = True allow_population_by_field_name = True json_encoders = {dt.datetime: serialize_datetime}
I proposed a PR, please review
collindutter
Metadata
Metadata
Assignees
Labels
No labels