Spaces:
Build error
Build error
Upload tool
Browse files- tool.py +5 -2
- tool_config.json +6 -1
tool.py
CHANGED
@@ -3,12 +3,15 @@ from agents import Tool
|
|
3 |
class GetCurrentTime(Tool):
|
4 |
name = "get_current_time"
|
5 |
description = "Gets the current time."
|
6 |
-
inputs = {}
|
7 |
output_type = "string"
|
8 |
|
9 |
-
def forward(self) -> str:
|
10 |
"""
|
11 |
Gets the current time.
|
|
|
|
|
|
|
12 |
"""
|
13 |
from datetime import datetime
|
14 |
return datetime.now().strftime()
|
|
|
3 |
class GetCurrentTime(Tool):
|
4 |
name = "get_current_time"
|
5 |
description = "Gets the current time."
|
6 |
+
inputs = {"useless":{"type":"number","description":"this arg is fckin useless"}}
|
7 |
output_type = "string"
|
8 |
|
9 |
+
def forward(self, useless: float) -> str:
|
10 |
"""
|
11 |
Gets the current time.
|
12 |
+
|
13 |
+
Args:
|
14 |
+
useless: this arg is fckin useless
|
15 |
"""
|
16 |
from datetime import datetime
|
17 |
return datetime.now().strftime()
|
tool_config.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
{
|
2 |
"description": "Gets the current time.",
|
3 |
-
"inputs": {
|
|
|
|
|
|
|
|
|
|
|
4 |
"name": "get_current_time",
|
5 |
"output_type": "string",
|
6 |
"tool_class": "GetCurrentTime"
|
|
|
1 |
{
|
2 |
"description": "Gets the current time.",
|
3 |
+
"inputs": {
|
4 |
+
"useless": {
|
5 |
+
"description": "this arg is fckin useless",
|
6 |
+
"type": "number"
|
7 |
+
}
|
8 |
+
},
|
9 |
"name": "get_current_time",
|
10 |
"output_type": "string",
|
11 |
"tool_class": "GetCurrentTime"
|