You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/playground/structs/hierarchical_swarm.py

20 lines
284 B

1 year ago
import os
11 months ago
1 year ago
from dotenv import load_dotenv
11 months ago
from swarms import Agent, OpenAIChat
1 year ago
# Load environment variables
load_dotenv()
# Create a chat instance
llm = OpenAIChat(
api_key=os.getenv("OPENAI_API_KEY"),
)
# Create an agent
agent = Agent(
agent_name="GPT-3",
llm=llm,
)