Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -35,14 +35,11 @@ def function_to_schema(func) -> dict:
|
|
35 |
]
|
36 |
|
37 |
return {
|
38 |
-
"
|
39 |
-
"
|
40 |
-
|
41 |
-
"
|
42 |
-
"
|
43 |
-
|
44 |
-
"properties": parameters,
|
45 |
-
"required": required,
|
46 |
-
},
|
47 |
},
|
48 |
}
|
|
|
35 |
]
|
36 |
|
37 |
return {
|
38 |
+
"name": func.__name__,
|
39 |
+
"description": func.__doc__ or "",
|
40 |
+
"parameters": {
|
41 |
+
"type": "object",
|
42 |
+
"properties": parameters,
|
43 |
+
"required": required,
|
|
|
|
|
|
|
44 |
},
|
45 |
}
|