Spaces:
Running
Running
Upload tool
Browse files
tool.py
CHANGED
@@ -4,7 +4,7 @@ from typing import Optional
|
|
4 |
class SimpleTool(Tool):
|
5 |
name = "get_travel_duration"
|
6 |
description = "Gets the travel time in car between two places."
|
7 |
-
inputs = {"start_location":{"type":"string","description":"the place from which you start your ride"},"destination_location":{"type":"string","description":"the place of arrival"},"departure_time":{"type":"integer","nullable":
|
8 |
output_type = "string"
|
9 |
|
10 |
def forward(self, start_location: str, destination_location: str, departure_time: Optional[int] = None) -> str:
|
|
|
4 |
class SimpleTool(Tool):
|
5 |
name = "get_travel_duration"
|
6 |
description = "Gets the travel time in car between two places."
|
7 |
+
inputs = {"start_location":{"type":"string","description":"the place from which you start your ride"},"destination_location":{"type":"string","description":"the place of arrival"},"departure_time":{"type":"integer","nullable":True,"description":"the departure time, provide only a `datetime.datetime` if you want to specify this"}}
|
8 |
output_type = "string"
|
9 |
|
10 |
def forward(self, start_location: str, destination_location: str, departure_time: Optional[int] = None) -> str:
|