wt002 commited on
Commit
62c3d7a
·
verified ·
1 Parent(s): cd3c655

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -1
agent.py CHANGED
@@ -393,7 +393,8 @@ embedding_model = HuggingFaceEmbeddings(model_name="sentence-transformers/all-Mi
393
  docs = [Document(page_content=text, metadata={"task_id": item["task_id"]}) for item in data]
394
 
395
  # Create the FAISS index
396
- vector_store = FAISS.from_documents(docs, embedding_model)
 
397
 
398
  # Save the FAISS index
399
  vector_store = MyVectorStore(index)
 
393
  docs = [Document(page_content=text, metadata={"task_id": item["task_id"]}) for item in data]
394
 
395
  # Create the FAISS index
396
+ #vector_store = FAISS.from_documents(docs, embedding_model)
397
+ vector_store = FAISS.from_texts(texts = text_chunks, embedding = embeddings)
398
 
399
  # Save the FAISS index
400
  vector_store = MyVectorStore(index)