From edec0e911d630292cbb959d1dce918d3b9ed502a Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 25 Jul 2023 17:49:19 -0400 Subject: [PATCH] clean up Former-commit-id: 3cc0d978659ced3080fd8de157c6b5ae3dfc14ad --- swarms/swarms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index 6c931f1f..710d8f73 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -46,7 +46,7 @@ class HierarchicalSwarm: """ try: # Initialize language model - if self.llm_class == OpenAI: + if self.llm_class == 'openai' or OpenAI: return llm_class(openai_api_key=self.openai_api_key, temperature=temperature) elif self.model_type == "huggingface": return HuggingFaceLLM(model_id=self.model_id, temperature=temperature) @@ -96,7 +96,7 @@ class HierarchicalSwarm: try: embeddings_model = OpenAIEmbeddings(openai_api_key=self.openai_api_key) - embedding_size = 9000 + embedding_size = self.embedding_size or 8192 index = faiss.IndexFlatL2(embedding_size) return FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})