Chat Completions
Run text inference based on the supplied parameters.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
A list of messages comprising the conversation so far.
ID of the model to use, or the model trait to select the model from.
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
-2 < x < 2
An upper bound for the number of tokens that can be generated for a completion.
Maximum number of tokens to generate.
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
-2 < x < 2
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
Up to 4 sequences where the API will stop generating further tokens.
Whether to stream back partial progress as server-sent events.
What sampling temperature to use. Higher values make output more random, lower values more focused.
0 < x < 2
A list of tools the model may call.
An alternative to sampling with temperature, called nucleus sampling.
0 < x < 1
Response
Unix timestamp of when the completion was created
Unique identifier for the chat completion
The model used for completion
The object type
chat.completion