Spaces:
Sleeping
Sleeping
Create tools.py
Browse files
tools.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# tools.py (optional if you want to enable tool calling)
|
| 2 |
+
|
| 3 |
+
tools = [
|
| 4 |
+
{
|
| 5 |
+
"type": "function",
|
| 6 |
+
"function": {
|
| 7 |
+
"name": "get_weather",
|
| 8 |
+
"description": "Get the weather for a specific city.",
|
| 9 |
+
"parameters": {
|
| 10 |
+
"type": "object",
|
| 11 |
+
"properties": {
|
| 12 |
+
"city": {"type": "string", "description": "The city to get weather for"}
|
| 13 |
+
},
|
| 14 |
+
"required": ["city"]
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
]
|