Skip to content

Commit

Permalink
updated cleaner.py with docs for transparency about the function of `…
Browse files Browse the repository at this point in the history
…create_partial_model`; created Roadmap.md for giving an overview of planned features and improvements.
  • Loading branch information
lennartpollvogt committed Jun 7, 2024
1 parent cd5ba57 commit 55a1e28
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Roadmap 🤩

Thank you for your interest in `ollama-instructor`. I've build this library to gain experience in the field of Large Language Models (LLMs) and Python as a programming language as well. Inspired by Jason Lius [instructor](https://github.com/jxnl/instructor) library I tried to create a library that nativly uses the Ollama client instead of the OpenAI client.

The current features of the `ollama-instructor` library are mentioned in the [README.md](/README.md) file. But as this library is still in development, there are still some features that are planned to be added. Here is a list of the features that are planned:

**Planned features**:

- [ ] Async client for chat_completion and chat_completion_with_stream
- [ ] Support image/multimodal models
- [ ] Advanced logging

**General enhancements**:
- [ ] Add more docs and guides + structure docs
- [ ] Advanced testing

---
> *Note*: I'm still discovering new fields of use cases, so if you have any suggestions or ideas, please feel free to open an issue or pull request. And I would be super happy to have pull requests for example code (see [examples](/examples/)).
20 changes: 20 additions & 0 deletions ollama_instructor/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@

from icecream import ic

# TODO: ref
'''
NOTE:
The function "create_partial_model" in the following was created with the research and help of Phind-70b from www.phind.com.
The research of the Phind system discovered concepts from different sources. A first draft of the function was created by Phind-70b.
The function was then improved by iterating over the use cases in collaboration with Phind-70b.
For transparency reasons I want to provide the sources:
- https://github.com/samuelcolvin/pydantic/issues/1673
- https://stackoverflow.com/questions/64045012/pydantic-input-model-for-partial-updates
- https://docs.pydantic.dev/latest/concepts/models/
- https://towardsdatascience.com/write-dry-data-models-with-partials-and-pydantic-b0b13d0eeb3a
- https://docs.pydantic.dev/1.10/usage/types/
- https://www.getorchestra.io/guides/pydantic-partial-update-models-in-fastapi-a-tutorial
- https://fastapi.tiangolo.com/tutorial/response-model/
- https://github.com/team23/pydantic-partial
- https://fastapi.tiangolo.com/tutorial/body-updates/
'''


def create_partial_model(pydantic_model: Type[BaseModel]) -> Type[BaseModel]:
'''
Creates a partial Pydantic model that accepts missing fields.
Expand Down

0 comments on commit 55a1e28

Please sign in to comment.