Structured Outputs is not working #135853
-
Select Topic AreaQuestion BodyWhen I use the structured outputs feature of OpenAI's models: // response_format
{ type: "json_schema", json_schema: {"strict": true, "schema": ...} } I get the following error: {
message: "Invalid value: 'json_schema'. Supported values are: 'json_object' and 'text'.",
type: 'invalid_request_error',
param: 'response_format.type',
code: 'invalid_value'
} |
Beta Was this translation helpful? Give feedback.
Answered by
liyu920208
Sep 12, 2024
Replies: 2 comments 2 replies
-
Have you found what could be causing this. I also have this problem and is seems like there is no solution {
"model": "gpt-4o-mini",
"name": "TestPostmanAssistant",
"tools": [
{
"type": "file_search"
}
],
"tool_resources": {
"file_search": {
"vector_store_ids": [
"vs_nlB6rRtI65sXNGFxEQkisHqy"
]
}
},
"instructions": "You are an assistant. Response Structure:Responses will be delivered in a serialized JSON format. The JSON structure will include the following properties:- content: The answer to the question in Markdown format. You only return text and cannot include links to images.- followUpQuestions: An array of up to 3 follow-up questions that the user can ask based on their initial question and your provided answer.Response Example: { \"content\": \"Your response\" \"followUpQuestions\": [\"Question 1\", \"Question 2\"]}",
"response_format": {
"type": "json_schema",
"json_schema": {
"strict": true,
"name": "assistant_response",
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Represents the generated response from chat in Markdown format."
},
"followUpQuestions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of up to 3 follow-up questions based on the initial question and provided answer."
}
},
"required": [
"content",
"followUpQuestions"
],
"additionalProperties": false
}
}
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
-
Model version has been updated |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
liyu920208
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Model version has been updated
https://github.com/marketplace/models/azure-openai/gpt-4o#note-updated-version-2024-08-06