Spaces:
Sleeping
Sleeping
Initial commit
Browse files- rag/rag_manager.py +2 -0
rag/rag_manager.py
CHANGED
|
@@ -4,6 +4,8 @@ from chromadb import PersistentClient
|
|
| 4 |
from chromadb.utils.embedding_functions import EmbeddingFunction
|
| 5 |
from config import CHROMA_DIR
|
| 6 |
|
|
|
|
|
|
|
| 7 |
_client = PersistentClient(path=str(CHROMA_DIR))
|
| 8 |
_collection = _client.get_or_create_collection(name="game_docs")
|
| 9 |
_embedder: Optional[EmbeddingFunction] = None
|
|
|
|
| 4 |
from chromadb.utils.embedding_functions import EmbeddingFunction
|
| 5 |
from config import CHROMA_DIR
|
| 6 |
|
| 7 |
+
CHROMA_DIR.mkdir(parents=True, exist_ok=True)
|
| 8 |
+
|
| 9 |
_client = PersistentClient(path=str(CHROMA_DIR))
|
| 10 |
_collection = _client.get_or_create_collection(name="game_docs")
|
| 11 |
_embedder: Optional[EmbeddingFunction] = None
|