Skip to content

Commit

Permalink
Merge pull request #738 from cheshire-cat-ai/develop
Browse files Browse the repository at this point in the history
1.5.1 fastembed compatibility and model cache
  • Loading branch information
pieroit authored Mar 8, 2024
2 parents d96fccd + b8c00f3 commit 4c9fff0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ test_db.db
# old admin folder
admin

# data folder (settings and models)
core/cat/data/*
!core/cat/data/.gitkeep

# plugins are not tracked by git
core/cat/plugins/*
# plugins readme can stay
Expand Down
5 changes: 3 additions & 2 deletions core/cat/factory/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)
from langchain_openai import OpenAIEmbeddings, AzureOpenAIEmbeddings
from langchain_google_genai import GoogleGenerativeAIEmbeddings
from fastembed.embedding import Embedding
from fastembed.embedding import TextEmbedding
from cat.factory.custom_embedder import DumbEmbedder, CustomOpenAIEmbeddings
from cat.mad_hatter.mad_hatter import MadHatter

Expand Down Expand Up @@ -125,7 +125,7 @@ class EmbedderCohereConfig(EmbedderSettings):
"FastEmbedModels",
{
item["model"].replace("/", "_").replace("-", "_"): item["model"]
for item in Embedding.list_supported_models()
for item in TextEmbedding.list_supported_models()
},
)

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

_pyclass: Type = FastEmbedEmbeddings

Expand Down
10 changes: 5 additions & 5 deletions core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "Cheshire-Cat"
description = "Production ready AI assistant framework"
version = "1.5.0"
version = "1.5.1"
requires-python = ">=3.10"
license = { file="LICENSE" }
authors = [
Expand All @@ -16,18 +16,18 @@ dependencies = [
"scikit-learn==1.2.1",
"qdrant_client==1.7.2",
"langchain==0.1.10",
"langchain-community==0.0.25",
"langchain-community==0.0.27",
"langchain-openai",
"langchain-google-genai",
"openai==1.10.0",
"cohere==4.39",
"huggingface-hub==0.19.4",
"huggingface-hub==0.20.3",
"beautifulsoup4==4.12.0",
"pdfminer.six==20221105",
"unstructured==0.5.7",
"tiktoken==0.5.2",
"tomli",
"loguru==0.7.0",
"loguru==0.7.2",
"anthropic==0.2.9",
"gunicorn==20.1.0",
"uvicorn[standard]==0.20.0",
Expand All @@ -40,7 +40,7 @@ dependencies = [
"pylint-actions",
"pytest",
"httpx",
"fastembed==0.1.3",
"fastembed==0.2.2",
"rapidfuzz==3.6.1",
]

Expand Down
13 changes: 13 additions & 0 deletions readme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.5.0 ( 2024-03-07 )

New in version 1.5.0: **Sir Punctilious Cat, the IV**!

- `@form` and `CatForm` to build goal oriented conversation in plugins - @Pingdred, @MaxDam, @pieroit and pizza challenge contributors
- `@tool` `examples` to easily trigger tools - @zAlweNy26, @Pingdred
- Agent refactoring (both `forms` ant `tools` are unified under procedural memory) - @Pingdred, @pieroit
- Async tools - @Pingdred
- Update Azure LLM - @cristianorevil
- Update HuggingFaceEndpoints LLM - @alessioserra
- Dependencies update
- More unit tests, more stability

## 1.4.8 ( 2024-02-10 )

New in version 1.4.8
Expand Down

0 comments on commit 4c9fff0

Please sign in to comment.