Spaces:
Sleeping
Sleeping
Commit ·
5375a1a
1
Parent(s): 084bcc6
fix for chromadb embedding fxn
Browse files- app/main_api.py +2 -2
app/main_api.py
CHANGED
|
@@ -787,11 +787,11 @@ class DeadlockFreeRAGPipeline:
|
|
| 787 |
self.vectorstore.add_texts(
|
| 788 |
texts=texts,
|
| 789 |
metadatas=[chunk['metadata'] for chunk in quality_chunks[:100]],
|
| 790 |
-
embeddings=embeddings #
|
| 791 |
)
|
| 792 |
|
| 793 |
logger.info(f"✅ Added {len(texts)} documents with embeddings to vector store (DEADLOCK-FREE)")
|
| 794 |
-
|
| 795 |
async def answer_question(self, question: str) -> str:
|
| 796 |
"""GEMINI'S FIX: Direct query embedding - no deadlock"""
|
| 797 |
# Security check
|
|
|
|
| 787 |
self.vectorstore.add_texts(
|
| 788 |
texts=texts,
|
| 789 |
metadatas=[chunk['metadata'] for chunk in quality_chunks[:100]],
|
| 790 |
+
embeddings=embeddings # <-- THE CRITICAL FIX - MAKE SURE THIS IS HERE
|
| 791 |
)
|
| 792 |
|
| 793 |
logger.info(f"✅ Added {len(texts)} documents with embeddings to vector store (DEADLOCK-FREE)")
|
| 794 |
+
|
| 795 |
async def answer_question(self, question: str) -> str:
|
| 796 |
"""GEMINI'S FIX: Direct query embedding - no deadlock"""
|
| 797 |
# Security check
|