You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"content": "You are a helpful math tutor. Guide the user through the solution step by step.",
218
+
},
219
+
{"role": "user", "content": "how can I solve 8x + 7 = -23"},
220
+
],
221
+
"response_format": {
222
+
"type": "json_schema",
223
+
"json_schema": {
224
+
"name": "math_reasoning",
225
+
"schema": {
226
+
"type": "object",
227
+
"properties": {
228
+
"steps": {
229
+
"type": "array",
230
+
"items": {
231
+
"type": "object",
232
+
"properties": {
233
+
"explanation": {"type": "string"},
234
+
"output": {"type": "string"},
235
+
},
236
+
"required": ["explanation", "output"],
237
+
"additionalProperties": False,
238
+
},
239
+
},
240
+
"final_answer": {"type": "string"},
241
+
},
242
+
"required": ["steps", "final_answer"],
243
+
"additionalProperties": False,
244
+
},
245
+
"strict": True,
246
+
},
247
+
},
248
+
}
249
+
response=ChatCompletion(
250
+
id="test",
251
+
choices=[
252
+
Choice(
253
+
index=0,
254
+
message=ChatCompletionMessage(
255
+
role="assistant",
256
+
content='{"steps":[{"explanation":"Start with the original equation: 8x + 7 = -23","output":"8x + 7 = -23"},{"explanation":"Subtract 7 from both sides to isolate the term with x on one side. This will give us: 8x = -23 - 7","output":"8x = -30"},{"explanation":"Now simplify the right side: -23 - 7 equals -30, so we have 8x = -30","output":"8x = -30"},{"explanation":"Next, divide both sides by 8 to solve for x. This gives us: x = -30 / 8","output":"x = -3.75"},{"explanation":"We can also simplify -30 / 8 by dividing both the numerator and the denominator by 2. This leads to: x = -15 / 4","output":"x = -15/4 (or -3.75 as a decimal)"}],"final_answer":"x = -17/4"}',
0 commit comments