Skip to content

Commit 19c750e

Browse files
committed
set tools in constructor
1 parent 3d68c84 commit 19c750e

File tree

2 files changed

+3
-5
lines changed
  • template_langgraph/agents

2 files changed

+3
-5
lines changed

template_langgraph/agents/chat_with_tools_agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def __call__(self, inputs: dict):
3636

3737

3838
class ChatWithToolsAgent:
39-
def __init__(self):
39+
def __init__(self, tools=DEFAULT_TOOLS):
4040
self.llm = AzureOpenAiWrapper().chat_model
41-
self.tools = DEFAULT_TOOLS
41+
self.tools = tools
4242

4343
def create_graph(self):
4444
"""Create the main graph for the agent."""

template_langgraph/agents/kabuto_helpdesk_agent/agent.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99

1010
class KabutoHelpdeskAgent:
11-
def __init__(self, tools=None):
12-
if tools is None:
13-
tools = DEFAULT_TOOLS
11+
def __init__(self, tools=DEFAULT_TOOLS):
1412
self.agent = create_react_agent(
1513
model=AzureOpenAiWrapper().chat_model,
1614
tools=tools,

0 commit comments

Comments
 (0)