ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
2.69k stars 221 forks source link

:grey_question: Dealing with Structured Outputs (`pydantic`) :memo: #108

Open adriens opened 3 months ago

adriens commented 3 months ago

:grey_question: About

ollama-python is a very very convenient way to deal with local LLMs. Actually we can do a lot of stuff from the sdk facade, and I do now wonder if there are some code snippets to achieve Structured Outputs for SDK, or eventually around, see:

:dart: The question

Would there be a way to achieve this from sdk ?