✨ feat(chat.py): use LRUCache from cachetools to limit the size of flow_data_store
The cachetools package is added as a dependency to improve caching. In chat.py, a ValueError is raised if no ID is provided in init_build to prevent errors. The flow_data_store dictionary is replaced with an LRUCache from cachetools to limit the size of the cache to 10 items. This improves performance by reducing the memory usage of the application. 📦 chore(pyproject.toml): add cachetools dependency to improve caching 🐛 fix(chat.py): raise ValueError if no ID is provided in init_build
This commit is contained in:
parent
f42830ca47
commit
deb056df32
3 changed files with 6 additions and 3 deletions
|
|
@ -61,6 +61,7 @@ faiss-cpu = "^1.7.4"
|
|||
anthropic = "^0.2.9"
|
||||
orjson = "^3.9.0"
|
||||
multiprocess = "^0.70.14"
|
||||
cachetools = "^5.3.1"
|
||||
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue