From 132feefe761867f8ffc140d62135f6e47ddc07b0 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 6 Sep 2023 15:11:12 -0400 Subject: [PATCH] Version 1.0.0 release (#223) Version 1.0.0 release --- README.md | 29 +++++++++++++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af4d880..0c2d0f8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -**⚠ WARNING: Prototype with unstable API. 🚧** - [![Unit Tests](https://github.com/eyurtsev/kor/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/eyurtsev/kor/actions/workflows/test.yml) [![Test Docs](https://github.com/eyurtsev/kor/actions/workflows/doc_test.yaml/badge.svg?branch=main&event=push)](https://github.com/eyurtsev/kor/actions/workflows/doc_test.yaml) @@ -20,6 +18,33 @@ See [documentation](https://eyurtsev.github.io/kor/). Integrated with the [LangChain framework 😽💗 🦜🔗](https://python.langchain.com/en/latest/index.html). + +## Version 1.0.0 Release + +* `kor` compatible with both pydantic v2 and v1. +* pydantic v2 had significant breaking changes w/ respect to v1, `kor` major + version bump was used as a precaution. + + +Main things to watch out for: + +1. Use a `default` value for any Optional fields if using pydantic v2 for validation. + +```python +class MusicRequest(BaseModel): + song: Optional[List[str]] = Field( + default=None, + description="The song(s) that the user would like to be played." + ) +``` + +2. Kor schema is typed checked using pydantic. Pydantic v2 is stricter, and may + catch issues that were hiding in existing user code that was using the `kor` + library. + +3. Serialization has not yet been implemented with pydantic v2. + + ## Kor style schema ```python diff --git a/pyproject.toml b/pyproject.toml index 754de67..72435da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kor" -version = "0.13.0" +version = "1.0.0" description = "Extract information with LLMs from text" authors = ["Eugene Yurtsev "] license = "MIT"