CompletionLegacyRequest
| Property | Type | Required | Description |
|---|---|---|---|
model | string | Yes | ID of the model to use. |
prompt | string | string[] | integer[] | integer[][] | Yes | The prompt(s) to generate completions for - can be string, array of strings, tokens, or token arrays. |
best_of | integer | null | No | Generate best_of completions and return the best one. Must be greater than n if both are set. |
echo | boolean | null | No | Echo back the prompt in addition to the completion. Default: false. |
frequency_penalty | number | null | No | Penalize new tokens based on their existing frequency (-2.0 to 2.0). |
logit_bias | object | null | No | Modify likelihood of specified tokens appearing (token ID -> bias from -100 to 100). |
logprobs | integer | null | No | Include log probabilities on the most likely tokens (max 5). |
max_tokens | integer | null | No | Maximum number of tokens to generate in the completion. |
n | integer | null | No | How many completions to generate for each prompt. |
presence_penalty | number | null | No | Penalize new tokens based on whether they appear in the text so far (-2.0 to 2.0). |
seed | integer | null | No | Seed for deterministic sampling (best effort, not guaranteed). |
stop | string | StopSequenceList | null | No | Up to 4 sequences where the API will stop generating. |
stream | boolean | null | No | Stream back partial progress as server-sent events. Default: false. |
stream_options | server__models__completions__StreamOptions | null | No | Options for streaming response (only used when stream=True). |
suffix | string | null | No | Suffix after completion of inserted text. |
temperature | number | null | No | Sampling temperature (0-2). Higher = more random, lower = more deterministic. |
top_p | number | null | No | Nucleus sampling - consider tokens with top_p probability mass (0-1). |
user | string | null | No | Unique identifier for end-user to help monitor and detect abuse. |
We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.