You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f63f14b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(api): clarify when to omit completion choice count (#4298)
## Summary
Clarifies the choice-count guidance for Chat Completions and
Completions.
## Changes
- In Chat Completions, explain that newer models reject an explicit n,
including n=1.
- In legacy Completions, document that omitting n generates one
completion per prompt.
Co-authored-by: dpiet-oai <326640584+dpiet-oai@users.noreply.github.com>
Copy file name to clipboardExpand all lines: api_reference/openapi.transformed.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43264,7 +43264,7 @@ components:
43264
43264
maximum: 128
43265
43265
default: 1
43266
43266
example: 1
43267
-
description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
43267
+
description: How many chat completion choices to generate for each input message. Omit `n` to generate one choice. Newer models reject an explicit `n`, even `n=1`. When requesting multiple choices, you are billed for generated tokens across all choices.
43268
43268
prediction:
43269
43269
description: |
43270
43270
Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs),
@@ -43745,7 +43745,7 @@ components:
43745
43745
default: 1
43746
43746
example: 1
43747
43747
description: |
43748
-
How many completions to generate for each prompt.
43748
+
How many completions to generate for each prompt. Omit `n` to generate one completion per prompt.
43749
43749
43750
43750
**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
0 commit comments