Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,20 +26,23 @@ metrics_tracker = EduBotMetrics(save_file="edu_metrics.json")
|
|
| 26 |
|
| 27 |
tools = [
|
| 28 |
{
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
"
|
| 35 |
-
"
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
},
|
| 41 |
-
|
| 42 |
-
},
|
| 43 |
}
|
| 44 |
]
|
| 45 |
|
|
|
|
| 26 |
|
| 27 |
tools = [
|
| 28 |
{
|
| 29 |
+
"type": "function",
|
| 30 |
+
"function": {
|
| 31 |
+
"name": "create_graph",
|
| 32 |
+
"description": "Generates a plot (bar, line, or pie) and returns it as an HTML-formatted Base64-encoded image string. The data and labels arguments must be JSON-encoded strings. Use simple, descriptive labels for plots. Use this tool to produce plots for practice questions, data visualization use cases, or any other case where the student may benefit from a graph.",
|
| 33 |
+
"parameters": {
|
| 34 |
+
"type": "object",
|
| 35 |
+
"properties": {
|
| 36 |
+
"data_json": {"type": "string"},
|
| 37 |
+
"labels_json": {"type": "string"},
|
| 38 |
+
"plot_type": {"type": "string", "enum": ["bar", "line", "pie"]},
|
| 39 |
+
"title": {"type": "string"},
|
| 40 |
+
"x_label": {"type": "string"},
|
| 41 |
+
"y_label": {"type": "string"},
|
| 42 |
+
},
|
| 43 |
+
"required": ["data_json", "labels_json", "plot_type", "title"],
|
| 44 |
},
|
| 45 |
+
}
|
|
|
|
| 46 |
}
|
| 47 |
]
|
| 48 |
|