From 72ca6ffdd2c52dae4b7e6f0383ac6c7553a183e1 Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 29 Jul 2023 11:23:35 -0400 Subject: [PATCH] llm not defined Former-commit-id: a3c0453ec0d32b74b0a832fc0e826529e6b9c253 --- swarms/swarms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index 2a2d1d3c..a746459b 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -70,7 +70,7 @@ class HierarchicalSwarm: - def initialize_llm(self, llm_class: str = None): + def initialize_llm(self, llm_class): """ Init LLM @@ -80,7 +80,7 @@ class HierarchicalSwarm: """ try: # Initialize language model - return OpenAI(openai_api_key=self.openai_api_key, temperature=self.temperature) + self.llm = OpenAI(openai_api_key=self.openai_api_key, temperature=self.temperature) except Exception as e: logging.error(f"Failed to initialize language model: {e}")