fix the wrong request body in json mode doc (#15729)

This commit is contained in:
Sameer Kankute 2025-10-20 21:14:14 +05:30 committed by GitHub
parent 3ef9b2015a
commit 3955a3de5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -309,33 +309,30 @@ curl http://0.0.0.0:4000/v1/chat/completions \
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday."},
],
"response_format": {
"type": "json_object",
"response_schema": {
"type": "json_schema",
"json_schema": {
"name": "math_reasoning",
"schema": {
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"explanation": { "type": "string" },
"output": { "type": "string" }
},
"required": ["explanation", "output"],
"additionalProperties": false
}
"type": "json_schema",
"json_schema": {
"name": "math_reasoning",
"schema": {
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"explanation": { "type": "string" },
"output": { "type": "string" }
},
"final_answer": { "type": "string" }
},
"required": ["steps", "final_answer"],
"additionalProperties": false
"required": ["explanation", "output"],
"additionalProperties": false
}
},
"strict": true
"final_answer": { "type": "string" }
},
"required": ["steps", "final_answer"],
"additionalProperties": false
},
"strict": true
}
},
}'