Skip to content

Commit 4c9fff0

Browse files
authored
Merge pull request #738 from cheshire-cat-ai/develop
1.5.1 fastembed compatibility and model cache
2 parents d96fccd + b8c00f3 commit 4c9fff0

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ test_db.db
2424
# old admin folder
2525
admin
2626

27+
# data folder (settings and models)
28+
core/cat/data/*
29+
!core/cat/data/.gitkeep
30+
2731
# plugins are not tracked by git
2832
core/cat/plugins/*
2933
# plugins readme can stay

core/cat/factory/embedder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111
from langchain_openai import OpenAIEmbeddings, AzureOpenAIEmbeddings
1212
from langchain_google_genai import GoogleGenerativeAIEmbeddings
13-
from fastembed.embedding import Embedding
13+
from fastembed.embedding import TextEmbedding
1414
from cat.factory.custom_embedder import DumbEmbedder, CustomOpenAIEmbeddings
1515
from cat.mad_hatter.mad_hatter import MadHatter
1616

@@ -125,7 +125,7 @@ class EmbedderCohereConfig(EmbedderSettings):
125125
"FastEmbedModels",
126126
{
127127
item["model"].replace("/", "_").replace("-", "_"): item["model"]
128-
for item in Embedding.list_supported_models()
128+
for item in TextEmbedding.list_supported_models()
129129
},
130130
)
131131

@@ -134,6 +134,7 @@ class EmbedderQdrantFastEmbedConfig(EmbedderSettings):
134134
model_name: FastEmbedModels = Field(title="Model name", default="BAAI/bge-base-en")
135135
max_length: int = 512 # Unknown behavior for values > 512.
136136
doc_embed_type: str = "passage" # as suggest on fastembed documentation, "passage" is the best option for documents.
137+
cache_dir: str = "cat/data/models/fast_embed"
137138

138139
_pyclass: Type = FastEmbedEmbeddings
139140

core/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "Cheshire-Cat"
33
description = "Production ready AI assistant framework"
4-
version = "1.5.0"
4+
version = "1.5.1"
55
requires-python = ">=3.10"
66
license = { file="LICENSE" }
77
authors = [
@@ -16,18 +16,18 @@ dependencies = [
1616
"scikit-learn==1.2.1",
1717
"qdrant_client==1.7.2",
1818
"langchain==0.1.10",
19-
"langchain-community==0.0.25",
19+
"langchain-community==0.0.27",
2020
"langchain-openai",
2121
"langchain-google-genai",
2222
"openai==1.10.0",
2323
"cohere==4.39",
24-
"huggingface-hub==0.19.4",
24+
"huggingface-hub==0.20.3",
2525
"beautifulsoup4==4.12.0",
2626
"pdfminer.six==20221105",
2727
"unstructured==0.5.7",
2828
"tiktoken==0.5.2",
2929
"tomli",
30-
"loguru==0.7.0",
30+
"loguru==0.7.2",
3131
"anthropic==0.2.9",
3232
"gunicorn==20.1.0",
3333
"uvicorn[standard]==0.20.0",
@@ -40,7 +40,7 @@ dependencies = [
4040
"pylint-actions",
4141
"pytest",
4242
"httpx",
43-
"fastembed==0.1.3",
43+
"fastembed==0.2.2",
4444
"rapidfuzz==3.6.1",
4545
]
4646

readme/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 1.5.0 ( 2024-03-07 )
4+
5+
New in version 1.5.0: **Sir Punctilious Cat, the IV**!
6+
7+
- `@form` and `CatForm` to build goal oriented conversation in plugins - @Pingdred, @MaxDam, @pieroit and pizza challenge contributors
8+
- `@tool` `examples` to easily trigger tools - @zAlweNy26, @Pingdred
9+
- Agent refactoring (both `forms` ant `tools` are unified under procedural memory) - @Pingdred, @pieroit
10+
- Async tools - @Pingdred
11+
- Update Azure LLM - @cristianorevil
12+
- Update HuggingFaceEndpoints LLM - @alessioserra
13+
- Dependencies update
14+
- More unit tests, more stability
15+
316
## 1.4.8 ( 2024-02-10 )
417

518
New in version 1.4.8

0 commit comments

Comments
 (0)