|
|
@ -87,8 +87,7 @@ class VortexWorkerAgent:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
openai_api_key = self.openai_api_key or os.getenv("OPENAI_API_KEY")
|
|
|
|
openai_api_key = self.openai_api_key or os.getenv("OPENAI_API_KEY")
|
|
|
|
embeddings_model = OpenAIEmbeddings(openai_api_key=openai_api_key)
|
|
|
|
embeddings_model = OpenAIEmbeddings(openai_api_key=openai_api_key)
|
|
|
|
embedding_size = 8192
|
|
|
|
index = faiss.IndexFlatL2(self.embedding_size)
|
|
|
|
index = faiss.IndexFlatL2(s)
|
|
|
|
|
|
|
|
return FAISS(embeddings_model, index, InMemoryDocstore({}), {})
|
|
|
|
return FAISS(embeddings_model, index, InMemoryDocstore({}), {})
|
|
|
|
except Exception as error:
|
|
|
|
except Exception as error:
|
|
|
|
logging.error(f"Failed to initialize vector store: {error}")
|
|
|
|
logging.error(f"Failed to initialize vector store: {error}")
|
|
|
|