mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
[PR #276] [MERGED] add pydantic for validation and serialization #446
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ollama/ollama-python/pull/276
Author: @mxyng
Created: 9/10/2024
Status: ✅ Merged
Merged: 11/8/2024
Merged by: @mxyng
Base:
main← Head:mxyng/pydantic📝 Commits (3)
0bbc246pydantic typesf258342Pydantic Fixes and Tests (#311)7205218Fixing empty header + ensuring security (#313)📊 Changes
8 files changed (+1244 additions, -636 deletions)
View changed files
📝
ollama/__init__.py(+18 -16)📝
ollama/_client.py(+512 -372)📝
ollama/_types.py(+326 -97)📝
poetry.lock(+161 -1)📝
pyproject.toml(+1 -0)📝
requirements.txt(+100 -1)📝
tests/test_client.py(+111 -149)➕
tests/test_type_serialization.py(+15 -0)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.