|
|
@ -844,7 +844,7 @@ class Agent:
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# Use a default temperature
|
|
|
|
# Use a default temperature
|
|
|
|
self.llm.temperature = 0.5
|
|
|
|
self.llm.temperature = 0.5
|
|
|
|
except Exception as error:
|
|
|
|
except Exception as error:
|
|
|
|
logger.error(
|
|
|
|
logger.error(
|
|
|
|
f"Error dynamically changing temperature: {error}"
|
|
|
|
f"Error dynamically changing temperature: {error}"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -1932,14 +1932,13 @@ class Agent:
|
|
|
|
raise error
|
|
|
|
raise error
|
|
|
|
|
|
|
|
|
|
|
|
def add_tool(self, tool: Callable):
|
|
|
|
def add_tool(self, tool: Callable):
|
|
|
|
"""Add a single tool to the agent's tools list."""
|
|
|
|
"""Add a single tool to the agent's tools list.
|
|
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
Args:
|
|
|
|
tool (Callable): The tool function to add
|
|
|
|
tool (Callable): The tool function to add
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
Returns:
|
|
|
|
The result of appending the tool to the tools list
|
|
|
|
The result of appending the tool to the tools list"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
logger.info(f"Adding tool: {tool.__name__}")
|
|
|
|
logger.info(f"Adding tool: {tool.__name__}")
|
|
|
|
return self.tools.append(tool)
|
|
|
|
return self.tools.append(tool)
|
|
|
|
|
|
|
|
|
|
|
|