Spaces:
Paused
Paused
Upload agent
Browse files- agent.json +11 -11
- requirements.txt +2 -2
- tools/suggest_menu.py +4 -3
- tools/visit_webpage.py +2 -2
agent.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
"data": {
|
| 13 |
"seed": 42,
|
| 14 |
"temperature": 0.2,
|
| 15 |
-
"last_input_token_count":
|
| 16 |
-
"last_output_token_count":
|
| 17 |
"model_id": "local_vllm"
|
| 18 |
}
|
| 19 |
},
|
|
@@ -44,23 +44,23 @@
|
|
| 44 |
"name": null,
|
| 45 |
"description": null,
|
| 46 |
"requirements": [
|
| 47 |
-
"duckduckgo_search",
|
| 48 |
-
"smolagents",
|
| 49 |
"markdownify",
|
| 50 |
-
"requests"
|
|
|
|
|
|
|
| 51 |
],
|
| 52 |
"authorized_imports": [
|
| 53 |
-
"itertools",
|
| 54 |
"stat",
|
| 55 |
-
"
|
| 56 |
-
"re",
|
| 57 |
-
"statistics",
|
| 58 |
-
"datetime",
|
| 59 |
"math",
|
|
|
|
| 60 |
"time",
|
|
|
|
|
|
|
| 61 |
"unicodedata",
|
| 62 |
"random",
|
| 63 |
-
"
|
|
|
|
| 64 |
],
|
| 65 |
"executor_type": "local",
|
| 66 |
"executor_kwargs": {},
|
|
|
|
| 12 |
"data": {
|
| 13 |
"seed": 42,
|
| 14 |
"temperature": 0.2,
|
| 15 |
+
"last_input_token_count": 2327,
|
| 16 |
+
"last_output_token_count": 48,
|
| 17 |
"model_id": "local_vllm"
|
| 18 |
}
|
| 19 |
},
|
|
|
|
| 44 |
"name": null,
|
| 45 |
"description": null,
|
| 46 |
"requirements": [
|
|
|
|
|
|
|
| 47 |
"markdownify",
|
| 48 |
+
"requests",
|
| 49 |
+
"smolagents",
|
| 50 |
+
"duckduckgo_search"
|
| 51 |
],
|
| 52 |
"authorized_imports": [
|
|
|
|
| 53 |
"stat",
|
| 54 |
+
"collections",
|
|
|
|
|
|
|
|
|
|
| 55 |
"math",
|
| 56 |
+
"queue",
|
| 57 |
"time",
|
| 58 |
+
"itertools",
|
| 59 |
+
"statistics",
|
| 60 |
"unicodedata",
|
| 61 |
"random",
|
| 62 |
+
"datetime",
|
| 63 |
+
"re"
|
| 64 |
],
|
| 65 |
"executor_type": "local",
|
| 66 |
"executor_kwargs": {},
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
duckduckgo_search
|
| 2 |
-
smolagents
|
| 3 |
markdownify
|
| 4 |
requests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
markdownify
|
| 2 |
requests
|
| 3 |
+
smolagents
|
| 4 |
+
duckduckgo_search
|
tools/suggest_menu.py
CHANGED
|
@@ -13,11 +13,12 @@ class SimpleTool(Tool):
|
|
| 13 |
Args:
|
| 14 |
occasion: The type of occasion for the party.
|
| 15 |
"""
|
| 16 |
-
|
|
|
|
| 17 |
return "Pizza, snacks, and drinks."
|
| 18 |
-
elif
|
| 19 |
return "3-course dinner with wine and dessert."
|
| 20 |
-
elif
|
| 21 |
return "Buffet with high-energy and healthy food."
|
| 22 |
else:
|
| 23 |
return "Custom menu for the butler."
|
|
|
|
| 13 |
Args:
|
| 14 |
occasion: The type of occasion for the party.
|
| 15 |
"""
|
| 16 |
+
occasion = str(occasion).lower()
|
| 17 |
+
if "casual" in occasion:
|
| 18 |
return "Pizza, snacks, and drinks."
|
| 19 |
+
elif "formal" in occasion:
|
| 20 |
return "3-course dinner with wine and dessert."
|
| 21 |
+
elif "superhero" in occasion:
|
| 22 |
return "Buffet with high-energy and healthy food."
|
| 23 |
else:
|
| 24 |
return "Custom menu for the butler."
|
tools/visit_webpage.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
from typing import Any, Optional
|
| 2 |
from smolagents.tools import Tool
|
| 3 |
-
import re
|
| 4 |
import markdownify
|
| 5 |
-
import smolagents
|
| 6 |
import requests
|
|
|
|
|
|
|
| 7 |
|
| 8 |
class VisitWebpageTool(Tool):
|
| 9 |
name = "visit_webpage"
|
|
|
|
| 1 |
from typing import Any, Optional
|
| 2 |
from smolagents.tools import Tool
|
|
|
|
| 3 |
import markdownify
|
|
|
|
| 4 |
import requests
|
| 5 |
+
import re
|
| 6 |
+
import smolagents
|
| 7 |
|
| 8 |
class VisitWebpageTool(Tool):
|
| 9 |
name = "visit_webpage"
|