From 15ea5315f266288eb86ee88ef2f11b17de5af81c Mon Sep 17 00:00:00 2001 From: peytontolbert Date: Mon, 14 Oct 2024 19:19:54 -0400 Subject: [PATCH] logger to swarmnetwork and optional Agent tools --- swarms/structs/agent.py | 4 ++-- swarms/structs/swarm_net.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/swarms/structs/agent.py b/swarms/structs/agent.py index 47e41082..415f0ee1 100644 --- a/swarms/structs/agent.py +++ b/swarms/structs/agent.py @@ -194,7 +194,7 @@ class Agent: agent_description: Optional[str] = None, system_prompt: Optional[str] = AGENT_SYSTEM_PROMPT_3, # TODO: Change to callable, then parse the callable to a string - tools: List[Callable] = None, + tools: Optional[List[Callable]] = None, dynamic_temperature_enabled: Optional[bool] = False, sop: Optional[str] = None, sop_list: Optional[List[str]] = None, @@ -240,7 +240,7 @@ class Agent: function_calling_type: str = "json", output_cleaner: Optional[Callable] = None, function_calling_format_type: Optional[str] = "OpenAI", - list_base_models: Optional[List[BaseModel]] = [], + list_base_models: Optional[List[BaseModel]] = None, metadata_output_type: str = "json", state_save_file_type: str = "json", chain_of_thoughts: bool = False, diff --git a/swarms/structs/swarm_net.py b/swarms/structs/swarm_net.py index 33be00de..f42683b6 100644 --- a/swarms/structs/swarm_net.py +++ b/swarms/structs/swarm_net.py @@ -133,6 +133,7 @@ class SwarmNetwork(BaseSwarm): self.host = host self.port = port self.swarm_callable = swarm_callable + self.logger = logger # Ensure that the agents list is not empty if not agents: