From 37408286779cc218333bc04408e529b6edd60d58 Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 29 Jul 2023 11:29:15 -0400 Subject: [PATCH] clean up --- swarms/swarms.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index 753b8f40..a03c2cc9 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -70,7 +70,7 @@ class HierarchicalSwarm: - def initialize_llm(self, llm_class, temperature=0.5): + def initialize_llm(self, llm_class): """ Init LLM @@ -80,14 +80,10 @@ class HierarchicalSwarm: """ try: # Initialize language model - if self.llm_class == OpenAI: - return llm_class(openai_api_key=self.openai_api_key, temperature=self.temperature) - else: - return self.llm_class(model_id="gpt-2", temperature=self.temperature) + return llm_class(openai_api_key=self.openai_api_key, temperature=self.temperature) except Exception as e: logging.error(f"Failed to initialize language model: {e}") - def initialize_tools(self, llm_class, extra_tools=None): """ Init tools