diff --git a/docs/release_note.md b/docs/release_note.md index 1802e40f..48ac439a 100644 --- a/docs/release_note.md +++ b/docs/release_note.md @@ -5,6 +5,61 @@ To read the following content, you need to understand the basic use of GPTCache, - [Readme doc](https://github.com/zilliztech/GPTCache) - [Usage doc](https://github.com/zilliztech/GPTCache/blob/main/docs/usage.md) +## v0.1.21 (2023.4.29) + +1. Support the temperature param + +```python +from gptcache.adapter import openai + +openai.ChatCompletion.create( + model="gpt-3.5-turbo", + temperature = 1.0, # Change temperature here + messages=[{ + "role": "user", + "content": question + }], +) +``` + +2. Add the session layer + +```python +from gptcache.adapter import openai +from gptcache.session import Session + +session = Session(name="my-session") +question = "what do you think about chatgpt" +openai.ChatCompletion.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "user", "content": question} + ], + session=session +) +``` + +details: https://github.com/zilliztech/GPTCache/tree/main/examples#How-to-run-with-session + +3. Support config cache with yaml for server + +```python +from gptcache.adapter.api import init_similar_cache_from_config + +init_similar_cache_from_config(config_dir="cache_config_template.yml") +``` + +config file template: https://github.com/zilliztech/GPTCache/blob/main/cache_config_template.yml + +4. Adapt the dolly model + +```python +from gptcache.adapter.dolly import Dolly + +llm = Dolly.from_model(model="databricks/dolly-v2-3b") +llm(question) +``` + ## v0.1.20 (2023.4.26) 1. support the `temperature` param, like openai diff --git a/setup.py b/setup.py index 481a899e..770f3203 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ def parse_requirements(file_name: str) -> List[str]: setuptools.setup( name="gptcache", packages=find_packages(), - version="0.1.20", + version="0.1.21", author="SimFG", author_email="bang.fu@zilliz.com", description="GPTCache, a powerful caching library that can be used to speed up and lower the cost of chat "