Create functions_definition.py
Browse files- functions_definition.py +24 -0
functions_definition.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tools = [
|
| 2 |
+
{
|
| 3 |
+
"type": "function",
|
| 4 |
+
"function": {
|
| 5 |
+
"name": "get_current_weather",
|
| 6 |
+
"description": "Get the current weather",
|
| 7 |
+
"parameters": {
|
| 8 |
+
"type": "object",
|
| 9 |
+
"properties": {
|
| 10 |
+
"location": {
|
| 11 |
+
"type": "string",
|
| 12 |
+
"description": "The city and state, e.g. San Francisco, CA",
|
| 13 |
+
},
|
| 14 |
+
"unit": {
|
| 15 |
+
"type": "string",
|
| 16 |
+
"enum": ["celsius", "fahrenheit"],
|
| 17 |
+
"description": "The temperature unit to use. Infer this from the users location.",
|
| 18 |
+
},
|
| 19 |
+
},
|
| 20 |
+
"required": ["location", "unit"],
|
| 21 |
+
},
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
]
|