Update hierarchical_swarm_example.py

pull/1101/head
CI-DEV 1 week ago committed by GitHub
parent 60e80e6104
commit 655687671a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,7 +7,7 @@ from swarms.structs.hiearchical_swarm import (
HierarchicalSwarm, HierarchicalSwarm,
SwarmSpec, SwarmSpec,
) )
from swarms.utils.function_caller_model import OpenAIFunctionCaller from swarms.utils.litellm_wrapper import LiteLLM
load_dotenv() load_dotenv()
@ -15,9 +15,9 @@ load_dotenv()
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Director LLM: Responsible for orchestrating tasks among the agents # Director LLM: Responsible for orchestrating tasks among the agents
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
llm = OpenAIFunctionCaller( llm = LiteLLM(
base_model=SwarmSpec, model_name="gpt-4o",
api_key=os.getenv("OPENAI_API_KEY"), response_format=SwarmSpec,
system_prompt=( system_prompt=(
"As the Director of this Hierarchical Agent Swarm, you are in charge of " "As the Director of this Hierarchical Agent Swarm, you are in charge of "
"coordinating and overseeing all tasks, ensuring that each is executed " "coordinating and overseeing all tasks, ensuring that each is executed "

Loading…
Cancel
Save