Spaces:
Running
Running
Update langchain-huggingface version and adjust imports in dataset and vector_store modules
Browse files- requirements.txt +1 -1
- src/knowledge_base/dataset.py +1 -1
- src/knowledge_base/vector_store.py +1 -1
requirements.txt
CHANGED
|
@@ -4,7 +4,7 @@ langchain>=0.1.0
|
|
| 4 |
langchain-community>=0.0.11
|
| 5 |
langchain-core>=0.1.10
|
| 6 |
langchain-text-splitters>=0.0.1
|
| 7 |
-
langchain-huggingface>=0.0.
|
| 8 |
faiss-cpu>=1.7.4
|
| 9 |
sentence-transformers>=2.2.2
|
| 10 |
beautifulsoup4>=4.12.2
|
|
|
|
| 4 |
langchain-community>=0.0.11
|
| 5 |
langchain-core>=0.1.10
|
| 6 |
langchain-text-splitters>=0.0.1
|
| 7 |
+
langchain-huggingface>=0.0.5 # обновить версию
|
| 8 |
faiss-cpu>=1.7.4
|
| 9 |
sentence-transformers>=2.2.2
|
| 10 |
beautifulsoup4>=4.12.2
|
src/knowledge_base/dataset.py
CHANGED
|
@@ -10,7 +10,7 @@ from datetime import datetime
|
|
| 10 |
from huggingface_hub import HfApi, HfFolder
|
| 11 |
from langchain_community.vectorstores import FAISS
|
| 12 |
from config.settings import VECTOR_STORE_PATH, HF_TOKEN, EMBEDDING_MODEL, DATASET_ID, CHAT_HISTORY_PATH
|
| 13 |
-
from
|
| 14 |
import logging
|
| 15 |
|
| 16 |
# Настройка логирования
|
|
|
|
| 10 |
from huggingface_hub import HfApi, HfFolder
|
| 11 |
from langchain_community.vectorstores import FAISS
|
| 12 |
from config.settings import VECTOR_STORE_PATH, HF_TOKEN, EMBEDDING_MODEL, DATASET_ID, CHAT_HISTORY_PATH
|
| 13 |
+
from langchain_huggingface import HuggingFaceEmbeddings # новый импорт
|
| 14 |
import logging
|
| 15 |
|
| 16 |
# Настройка логирования
|
src/knowledge_base/vector_store.py
CHANGED
|
@@ -3,7 +3,7 @@ import tempfile
|
|
| 3 |
import shutil
|
| 4 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
| 5 |
from langchain_community.vectorstores import FAISS
|
| 6 |
-
from langchain_huggingface import HuggingFaceEmbeddings
|
| 7 |
from src.knowledge_base.loader import load_documents
|
| 8 |
from config.settings import VECTOR_STORE_PATH, EMBEDDING_MODEL, HF_TOKEN
|
| 9 |
from config.constants import CHUNK_SIZE, CHUNK_OVERLAP
|
|
|
|
| 3 |
import shutil
|
| 4 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
| 5 |
from langchain_community.vectorstores import FAISS
|
| 6 |
+
from langchain_huggingface import HuggingFaceEmbeddings # новый импорт
|
| 7 |
from src.knowledge_base.loader import load_documents
|
| 8 |
from config.settings import VECTOR_STORE_PATH, EMBEDDING_MODEL, HF_TOKEN
|
| 9 |
from config.constants import CHUNK_SIZE, CHUNK_OVERLAP
|