Skip to content

Commit 8e5611c

Browse files
authored
Add Verbosity parameter to Chat Completion Request (#1064)
* add verbosity param to ChatCompletionRequest * edit comment about verbosity
1 parent f71d1a6 commit 8e5611c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

chat.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ type ChatCompletionRequest struct {
320320
ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"`
321321
// Specifies the latency tier to use for processing the request.
322322
ServiceTier ServiceTier `json:"service_tier,omitempty"`
323+
// Verbosity determines how many output tokens are generated. Lowering the number of
324+
// tokens reduces overall latency. It can be set to "low", "medium", or "high".
325+
// Note: This field is only confirmed to work with gpt-5, gpt-5-mini and gpt-5-nano.
326+
// Also, it is not in the API reference of chat completion at the time of writing,
327+
// though it is supported by the API.
328+
Verbosity string `json:"verbosity,omitempty"`
323329
// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
324330
// The IDs should be a string that uniquely identifies each user.
325331
// We recommend hashing their username or email address, in order to avoid sending us any identifying information.

0 commit comments

Comments
 (0)