diff --git a/swarms/workers/vortex_worker.py b/swarms/workers/vortex_worker.py index a225781f..2c64243b 100644 --- a/swarms/workers/vortex_worker.py +++ b/swarms/workers/vortex_worker.py @@ -87,8 +87,7 @@ class VortexWorkerAgent: try: openai_api_key = self.openai_api_key or os.getenv("OPENAI_API_KEY") embeddings_model = OpenAIEmbeddings(openai_api_key=openai_api_key) - embedding_size = 8192 - index = faiss.IndexFlatL2(s) + index = faiss.IndexFlatL2(self.embedding_size) return FAISS(embeddings_model, index, InMemoryDocstore({}), {}) except Exception as error: logging.error(f"Failed to initialize vector store: {error}")