Samuel Oberhofer commited on
Commit ·
8985b64
1
Parent(s): 8b9c52d
fix: Use /tmp for vector store to resolve permission issues
Browse files- rag/build_vector_store.py +1 -1
- rag/retriever.py +1 -1
rag/build_vector_store.py
CHANGED
|
@@ -32,7 +32,7 @@ def build_vector_store():
|
|
| 32 |
embeddings = model.encode(documents)
|
| 33 |
|
| 34 |
# Initialize ChromaDB client and create a collection
|
| 35 |
-
client = chromadb.PersistentClient(path="/
|
| 36 |
collection = client.get_or_create_collection("university_data")
|
| 37 |
|
| 38 |
# Add documents and embeddings to the collection
|
|
|
|
| 32 |
embeddings = model.encode(documents)
|
| 33 |
|
| 34 |
# Initialize ChromaDB client and create a collection
|
| 35 |
+
client = chromadb.PersistentClient(path="/tmp/vector_store")
|
| 36 |
collection = client.get_or_create_collection("university_data")
|
| 37 |
|
| 38 |
# Add documents and embeddings to the collection
|
rag/retriever.py
CHANGED
|
@@ -21,7 +21,7 @@ def search(query: str, top_k: int = 5):
|
|
| 21 |
query_embedding = model.encode([query])
|
| 22 |
|
| 23 |
# Initialize ChromaDB client and get the collection
|
| 24 |
-
client = chromadb.PersistentClient(path="/
|
| 25 |
collection = client.get_collection("university_data")
|
| 26 |
|
| 27 |
# Perform the search
|
|
|
|
| 21 |
query_embedding = model.encode([query])
|
| 22 |
|
| 23 |
# Initialize ChromaDB client and get the collection
|
| 24 |
+
client = chromadb.PersistentClient(path="/tmp/vector_store")
|
| 25 |
collection = client.get_collection("university_data")
|
| 26 |
|
| 27 |
# Perform the search
|