-
Notifications
You must be signed in to change notification settings - Fork 506
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
add pydantic for validation and serialization #276
Conversation
a4f0995
to
2b95c17
Compare
2b95c17
to
5f4496e
Compare
See #311 for pydantic type class fixes and serialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woooo Pydantic!!! 🥳 🎉
ollama/_client.py
Outdated
'Content-Type': 'application/json', | ||
'Accept': 'application/json', | ||
'User-Agent': f'ollama-python/{__version__} ({platform.machine()} {platform.system().lower()}) Python/{platform.python_version()}', | ||
}.update(headers or {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.update()
is going to return a None
which means no headers will get passed in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫡
* Added SubscriptableBaseModel to the Model classes and added Image codec test --------- Co-authored-by: Parth Sareen <parth@Parths-MacBook-Pro.local>
* Fixing empty header + ensuring security
while the interface should be backwards compatible, i.e. most tests and examples do not need any changes, this change wants a minor version bump
examples should be updated in a following change to use pydantic models where appropriate