We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 266d072 commit 69fb0afCopy full SHA for 69fb0af
lib/openai/resources/chat/completions.rb
@@ -119,6 +119,14 @@ def create(params)
119
}
120
121
)
122
+ in {response_format: {type: :json_schema, json_schema: OpenAI::StructuredOutput::JsonSchemaConverter => model}}
123
+ parsed.fetch(:response_format).update(
124
+ json_schema: {
125
+ strict: true,
126
+ name: model.name.split("::").last,
127
+ schema: model.to_json_schema
128
+ }
129
+ )
130
in {response_format: {type: :json_schema, json_schema: {schema: OpenAI::StructuredOutput::JsonSchemaConverter => model}}}
131
parsed.dig(:response_format, :json_schema).store(:schema, model.to_json_schema)
132
in {tools: Array => tools}
0 commit comments