embedding size

Former-commit-id: 92cf48c76d
pull/47/head
Kye 1 year ago
parent f9e95407e9
commit 4878c981dc

@ -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}")

Loading…
Cancel
Save