jdesiree commited on
Commit
151d7b5
·
verified ·
1 Parent(s): aa5d892

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -13
app.py CHANGED
@@ -26,20 +26,23 @@ metrics_tracker = EduBotMetrics(save_file="edu_metrics.json")
26
 
27
  tools = [
28
  {
29
- "name": "create_graph",
30
- "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.",
31
- "parameters": {
32
- "type": "object",
33
- "properties": {
34
- "data_json": {"type": "string"},
35
- "labels_json": {"type": "string"},
36
- "plot_type": {"type": "string", "enum": ["bar", "line", "pie"]},
37
- "title": {"type": "string"},
38
- "x_label": {"type": "string"},
39
- "y_label": {"type": "string"},
 
 
 
 
40
  },
41
- "required": ["data_json", "labels_json", "plot_type", "title"],
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