Bandook01 commited on
Commit
33f4c68
·
1 Parent(s): da372f7

update tool

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -17,7 +17,8 @@ from tools import (
17
  wiki_tool,
18
  YoutubeTranscript,
19
  )
20
- from smolagents import DuckDuckGoSearchTool
 
21
 
22
  # Llama-Index / HF Inference ---------------------------------------------------
23
  from llama_index.core.agent.workflow import AgentWorkflow # [1]
@@ -45,6 +46,8 @@ Tool Use Guidelines:
45
  8. To find information about what was said in a video use **YoutubeTranscript** tool to get the transcript and find the correct answer to the asked question
46
  9. Even for complex tasks, assume a solution exists. If one method fails, try another approach using different tools.
47
  10. Due to context length limits, keep browser-based tasks (e.g., searches) as short and efficient as possible.
 
 
48
  """
49
 
50
  # -----------------------------------------------------------------------------
@@ -71,7 +74,7 @@ class BasicAgent:
71
  download_server,
72
  wiki_tool,
73
  YoutubeTranscript,
74
- DuckDuckGoSearchTool,
75
  ]
76
  print("✅ BasicAgent initialized.")
77
 
 
17
  wiki_tool,
18
  YoutubeTranscript,
19
  )
20
+ from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
21
+
22
 
23
  # Llama-Index / HF Inference ---------------------------------------------------
24
  from llama_index.core.agent.workflow import AgentWorkflow # [1]
 
46
  8. To find information about what was said in a video use **YoutubeTranscript** tool to get the transcript and find the correct answer to the asked question
47
  9. Even for complex tasks, assume a solution exists. If one method fails, try another approach using different tools.
48
  10. Due to context length limits, keep browser-based tasks (e.g., searches) as short and efficient as possible.
49
+ 11. Use DuckDuckGoSearchToolSpec to find or verify information from web search.
50
+ 12. Use wiki_tool to find answers from wikipedia.
51
  """
52
 
53
  # -----------------------------------------------------------------------------
 
74
  download_server,
75
  wiki_tool,
76
  YoutubeTranscript,
77
+ DuckDuckGoSearchToolSpec,
78
  ]
79
  print("✅ BasicAgent initialized.")
80