Skip to content

Commit d0e27c9

Browse files
authored
Update the version to 0.1.27 (#389)
Signed-off-by: SimFG <bang.fu@zilliz.com>
1 parent 70dd16a commit d0e27c9

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

docs/release_note.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ To read the following content, you need to understand the basic use of GPTCache,
55
- [Readme doc](https://github.com/zilliztech/GPTCache)
66
- [Usage doc](https://github.com/zilliztech/GPTCache/blob/main/docs/usage.md)
77

8+
## v0.1.27 (2023.5.25)
9+
1. Support the uform embedding, which can be used the **bilingual** (english + chinese) language
10+
11+
```python
12+
from gptcache.embedding import UForm
13+
14+
test_sentence = 'Hello, world.'
15+
encoder = UForm(model='unum-cloud/uform-vl-english')
16+
embed = encoder.to_embeddings(test_sentence)
17+
18+
test_sentence = '什么是Github'
19+
encoder = UForm(model='unum-cloud/uform-vl-multilingual')
20+
embed = encoder.to_embeddings(test_sentence)
21+
```
22+
823
## v0.1.26 (2023.5.23)
924

1025
1. Support the paddlenlp embedding

gptcache/embedding/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"LangChain",
1212
"Rwkv",
1313
"PaddleNLP",
14+
"UForm",
1415
]
1516

1617

@@ -28,6 +29,7 @@
2829
langchain = LazyImport("langchain", globals(), "gptcache.embedding.langchain")
2930
rwkv = LazyImport("rwkv", globals(), "gptcache.embedding.rwkv")
3031
paddlenlp = LazyImport("paddlenlp", globals(), "gptcache.embedding.paddlenlp")
32+
uform = LazyImport("uform", globals(), "gptcache.embedding.uform")
3133

3234

3335
def Cohere(model="large", api_key=None):
@@ -76,3 +78,7 @@ def Rwkv(model="sgugger/rwkv-430M-pile"):
7678

7779
def PaddleNLP(model="ernie-3.0-medium-zh"):
7880
return paddlenlp.PaddleNLP(model)
81+
82+
83+
def UForm(model="unum-cloud/uform-vl-multilingual", embedding_type="text"):
84+
return uform.UForm(model, embedding_type)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def parse_requirements(file_name: str) -> List[str]:
1818
setuptools.setup(
1919
name="gptcache",
2020
packages=find_packages(),
21-
version="0.1.26",
21+
version="0.1.27",
2222
author="SimFG",
2323
author_email="bang.fu@zilliz.com",
2424
description="GPTCache, a powerful caching library that can be used to speed up and lower the cost of chat "

tests/unit_tests/embedding/test_uform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import requests
44

5-
from gptcache.embedding.uform import UForm
5+
from gptcache.embedding import UForm
66
from gptcache.utils import import_uform, import_pillow
77
from gptcache.utils.error import ParamError
88

0 commit comments

Comments
 (0)