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 6
6
from template_langgraph .agents .chat_with_tools_agent .models import AgentState
7
7
from template_langgraph .llms .azure_openais import AzureOpenAiWrapper
8
8
from 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
13
10
14
11
logger = get_logger (__name__ )
15
12
@@ -41,12 +38,7 @@ def __call__(self, inputs: dict):
41
38
class ChatWithToolsAgent :
42
39
def __init__ (self ):
43
40
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
50
42
51
43
def create_graph (self ):
52
44
"""Create the main graph for the agent."""
Original file line number Diff line number Diff line change 2
2
3
3
from template_langgraph .llms .azure_openais import AzureOpenAiWrapper
4
4
from 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
8
6
9
7
logger = get_logger (__name__ )
10
8
11
9
12
10
class KabutoHelpdeskAgent :
13
11
def __init__ (self , tools = None ):
14
12
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
22
14
self .agent = create_react_agent (
23
15
model = AzureOpenAiWrapper ().chat_model ,
24
16
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