Spaces:
Sleeping
Sleeping
Added DuckDuckGo search tool
Browse files
app.py
CHANGED
|
@@ -34,7 +34,10 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
|
|
|
|
| 37 |
final_answer = FinalAnswerTool()
|
|
|
|
|
|
|
| 38 |
model = HfApiModel(
|
| 39 |
max_tokens=2096,
|
| 40 |
temperature=0.5,
|
|
@@ -51,7 +54,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 51 |
|
| 52 |
agent = CodeAgent(
|
| 53 |
model=model,
|
| 54 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 55 |
max_steps=6,
|
| 56 |
verbosity_level=1,
|
| 57 |
grammar=None,
|
|
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
|
| 37 |
+
ddg_search = DuckDuckGoSearchTool()
|
| 38 |
final_answer = FinalAnswerTool()
|
| 39 |
+
|
| 40 |
+
|
| 41 |
model = HfApiModel(
|
| 42 |
max_tokens=2096,
|
| 43 |
temperature=0.5,
|
|
|
|
| 54 |
|
| 55 |
agent = CodeAgent(
|
| 56 |
model=model,
|
| 57 |
+
tools=[ddg_search, final_answer], ## add your tools here (don't remove final answer)
|
| 58 |
max_steps=6,
|
| 59 |
verbosity_level=1,
|
| 60 |
grammar=None,
|