diff --git a/pyproject.toml b/pyproject.toml index c2e52944..272aa44b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "1.7.8" +version = "1.7.9" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index 9059fd84..a0852127 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -23,7 +23,8 @@ from swarms.utils.decorators import error_decorator, log_decorator, timing_decor ROOT_DIR = "./data/" # main -openai_api_key = os.environ["OPENAI_API_KEY"] +OPENAI_API_KEY = os.environ["OPENAI_API_KEY"] + class Worker: """ @@ -72,7 +73,7 @@ class Worker: self.temperature = temperature self.human_in_the_loop = human_in_the_loop self.llm = llm - self.openai_api_key = openai_api_key or os.environ["OPENAI_API_KEY"] + self.openai_api_key = openai_api_key or OPENAI_API_KEY self.ai_name = ai_name self.ai_role = ai_role self.setup_tools(external_tools) @@ -281,4 +282,4 @@ class Worker: if isinstance(message, str): return {"content": message} else: - return message + return message \ No newline at end of file