File tree Expand file tree Collapse file tree 3 files changed +15
-20
lines changed Expand file tree Collapse file tree 3 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 66from template_langgraph .agents .chat_with_tools_agent .models import AgentState
77from template_langgraph .llms .azure_openais import AzureOpenAiWrapper
88from template_langgraph .loggers import get_logger
9- from template_langgraph .tools .cosmosdb_tool import search_cosmosdb
10- from template_langgraph .tools .dify_tool import run_dify_workflow
11- from template_langgraph .tools .elasticsearch_tool import search_elasticsearch
12- from template_langgraph .tools .qdrant_tool import search_qdrant
9+ from template_langgraph .tools .common import DEFAULT_TOOLS
1310
1411logger = get_logger (__name__ )
1512
@@ -41,12 +38,7 @@ def __call__(self, inputs: dict):
4138class ChatWithToolsAgent :
4239 def __init__ (self ):
4340 self .llm = AzureOpenAiWrapper ().chat_model
44- self .tools = [
45- search_cosmosdb ,
46- run_dify_workflow ,
47- search_qdrant ,
48- search_elasticsearch ,
49- ]
41+ self .tools = DEFAULT_TOOLS
5042
5143 def create_graph (self ):
5244 """Create the main graph for the agent."""
Original file line number Diff line number Diff line change 22
33from template_langgraph .llms .azure_openais import AzureOpenAiWrapper
44from template_langgraph .loggers import get_logger
5- from template_langgraph .tools .dify_tool import run_dify_workflow
6- from template_langgraph .tools .elasticsearch_tool import search_elasticsearch
7- from template_langgraph .tools .qdrant_tool import search_qdrant
5+ from template_langgraph .tools .common import DEFAULT_TOOLS
86
97logger = get_logger (__name__ )
108
119
1210class KabutoHelpdeskAgent :
1311 def __init__ (self , tools = None ):
1412 if tools is None :
15- # Default tool for searching Qdrant
16- tools = [
17- run_dify_workflow ,
18- search_qdrant ,
19- search_elasticsearch ,
20- # Add other tools as needed
21- ]
13+ tools = DEFAULT_TOOLS
2214 self .agent = create_react_agent (
2315 model = AzureOpenAiWrapper ().chat_model ,
2416 tools = tools ,
Original file line number Diff line number Diff line change 1+ from template_langgraph .tools .cosmosdb_tool import search_cosmosdb
2+ from template_langgraph .tools .dify_tool import run_dify_workflow
3+ from template_langgraph .tools .elasticsearch_tool import search_elasticsearch
4+ from template_langgraph .tools .qdrant_tool import search_qdrant
5+
6+ DEFAULT_TOOLS = [
7+ search_cosmosdb ,
8+ run_dify_workflow ,
9+ search_qdrant ,
10+ search_elasticsearch ,
11+ ]
You can’t perform that action at this time.
0 commit comments