Shared
ModelsExpand Collapse
The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters defines a function with an empty parameter list.
class Reasoning:gpt-5 and o-series models only
Configuration options for
reasoning models.
gpt-5 and o-series models only
Configuration options for reasoning models.
enum ReasoningEffort:Constrains effort on reasoning for reasoning models. Currently supported
values are none, minimal, low, medium, high, xhigh, and max.
Reducing reasoning effort can result in faster responses and fewer tokens
used on reasoning in a response. Not all reasoning models support every
value. See the
reasoning guide
for model-specific support.
Constrains effort on reasoning for reasoning models. Currently supported
values are none, minimal, low, medium, high, xhigh, and max.
Reducing reasoning effort can result in faster responses and fewer tokens
used on reasoning in a response. Not all reasoning models support every
value. See the
reasoning guide
for model-specific support.
class ResponseFormatJsonSchema:JSON Schema response format. Used to generate structured JSON responses.
Learn more about Structured Outputs.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
class ResponseFormatTextGrammar:A custom grammar for the model to follow when generating text.
Learn more in the custom grammars guide.
A custom grammar for the model to follow when generating text. Learn more in the custom grammars guide.
class ResponseFormatTextPython:Configure the model to generate valid Python code. See the
custom grammars guide for more details.
Configure the model to generate valid Python code. See the custom grammars guide for more details.