diff --git a/example.py b/example.py index 680ba2d7..0e48169e 100644 --- a/example.py +++ b/example.py @@ -1,11 +1,12 @@ from langchain.llms import OpenAIChat from swarms import Worker -llm = OpenAIChat(model_name="gpt-4", openai_api_, temperature=0.5) +llm = OpenAIChat(model_name="gpt-4", openai_api_key="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", temperature=0.5) node = Worker( llm=llm, ai_name="Optimus Prime", + openai_api_key="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", ai_role="Worker in a swarm", external_tools=None, human_in_the_loop=False, diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index c3bda43b..feebc472 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -1,5 +1,5 @@ import os -from typing import Dict, List, Optional, Union +from typing import Dict, Union import faiss from langchain.docstore import InMemoryDocstore