Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,14 +33,14 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
-
@tool
|
| 37 |
-
def get_time_hawaii() -> str:
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
|
| 45 |
|
| 46 |
final_answer = FinalAnswerTool()
|
|
@@ -60,7 +60,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
-
tools=[final_answer, get_current_time_in_timezone
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
+
# @tool
|
| 37 |
+
# def get_time_hawaii() -> str:
|
| 38 |
+
# "A tool that fetches the current time in hawaii"
|
| 39 |
+
# try:
|
| 40 |
+
# results = DuckDuckGoSearchTool("what is the current time in hawaii")
|
| 41 |
+
# return results
|
| 42 |
+
# except Exception as e:
|
| 43 |
+
# return f"i failed"
|
| 44 |
|
| 45 |
|
| 46 |
final_answer = FinalAnswerTool()
|
|
|
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
+
tools=[final_answer, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|