Spaces:
Sleeping
Sleeping
Update app.py
Browse filesCommented out FinalAnswer tool
app.py
CHANGED
|
@@ -87,8 +87,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 87 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 88 |
|
| 89 |
|
| 90 |
-
|
| 91 |
-
final_answer = FinalAnswerTool()
|
| 92 |
|
| 93 |
# Initialize the web search tool
|
| 94 |
search_tool = DuckDuckGoSearchTool()
|
|
@@ -116,7 +116,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 116 |
|
| 117 |
agent = CodeAgent(
|
| 118 |
model=model,
|
| 119 |
-
tools=[
|
| 120 |
max_steps=6,
|
| 121 |
verbosity_level=1,
|
| 122 |
grammar=None,
|
|
@@ -124,7 +124,7 @@ agent = CodeAgent(
|
|
| 124 |
add_base_tools=True, # Add any additional base tools
|
| 125 |
#planning_interval=3, # Enable planning every 3 steps
|
| 126 |
name=None,
|
| 127 |
-
description=
|
| 128 |
prompt_templates=prompt_templates
|
| 129 |
)
|
| 130 |
|
|
|
|
| 87 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 88 |
|
| 89 |
|
| 90 |
+
### Initialize the final answer tool
|
| 91 |
+
##final_answer = FinalAnswerTool()
|
| 92 |
|
| 93 |
# Initialize the web search tool
|
| 94 |
search_tool = DuckDuckGoSearchTool()
|
|
|
|
| 116 |
|
| 117 |
agent = CodeAgent(
|
| 118 |
model=model,
|
| 119 |
+
tools=[search_tool], ## add your tools here (don't remove final answer)
|
| 120 |
max_steps=6,
|
| 121 |
verbosity_level=1,
|
| 122 |
grammar=None,
|
|
|
|
| 124 |
add_base_tools=True, # Add any additional base tools
|
| 125 |
#planning_interval=3, # Enable planning every 3 steps
|
| 126 |
name=None,
|
| 127 |
+
description="This agent searches for the answer to the given prompt, iterates to find the best final answer to return as a text variable. For example: 'what color is grass?, final_answer='green'''.",
|
| 128 |
prompt_templates=prompt_templates
|
| 129 |
)
|
| 130 |
|