verbosity method

OpenAIBuilder verbosity(
  1. Verbosity level
)

Sets verbosity level for GPT-5 models

Controls how expansive the model's responses are:

  • Verbosity.low: Terse, minimal prose
  • Verbosity.medium: Balanced detail (default)
  • Verbosity.high: Verbose, great for audits, teaching, or hand-offs

This parameter is specific to GPT-5 series models and allows you to control output length and detail without changing your prompts.

Example:

final provider = await ai()
    .openai((openai) => openai.verbosity(Verbosity.high))
    .model('gpt-5')
    .build();

Implementation

OpenAIBuilder verbosity(Verbosity level) {
  _baseBuilder.extension('verbosity', level.value);
  return this;
}