qver3nc1a commited on
Commit
efbf423
·
verified ·
1 Parent(s): 7642533

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -40,20 +40,9 @@ def wikipedia_search(query: str):
40
  class BasicAgent:
41
  def __init__(self, model_id="ollama/qwen2:7b", api_base="http://192.168.1.77:11434"):
42
  print('BasicAgent initialized.')
43
- self.tools = [
44
- Tool(
45
- name="WebSearch",
46
- func=web_search,
47
- description="Search the web for information."
48
- ),
49
- Tool(
50
- name="WikipediaSearch",
51
- func=wikipedia_search,
52
- description="Search Wikipedia for information."
53
- )
54
- ]
55
  self.agent = ToolCallingAgent(
56
- tools=self.tools,
57
  model=LiteLLMModel(
58
  model_id=model_id,
59
  api_base=api_base
 
40
  class BasicAgent:
41
  def __init__(self, model_id="ollama/qwen2:7b", api_base="http://192.168.1.77:11434"):
42
  print('BasicAgent initialized.')
43
+ self.tool_node = [web_search, wikipedia_search]
 
 
 
 
 
 
 
 
 
 
 
44
  self.agent = ToolCallingAgent(
45
+ tools=[self.tool_node],
46
  model=LiteLLMModel(
47
  model_id=model_id,
48
  api_base=api_base