Documentation

AI Completion Options - Open Dev Kit Documentation

Open Dev Kit Documentation :: Open AI :: AI Completion Options

OpenAI.AICompletionOptions

Functions

Constructor ( Base AI Base Options, Stop String Array, Presence Penalty Float, Frequency Penalty Float, Best Of Integer, Logit Bias AI Token Bias Array, Log Probabilities Integer )

Properties

Base AI Base Options
Stop String Array
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
Presence Penalty Float
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.
Frequency Penalty Float
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.
Best Of Integer
Generates this number of completions server-side and returns the 'best' (the one with the highest log probability per token). Results cannot be streamed. When used with Number, this controls the number of candidate completions and n specifies how many to return – this must be greater than Number. 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.
Logit Bias AI Token Bias Array
Modify the likelihood of specified tokens appearing in the completion. As an example, you can pass '50256': '-100' to prevent the <|endoftext|> token from being generated.
Log Probabilities Integer
Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. Not available for chat right now.

If you think anything is missing, please feel free to: submit documentation feedback on this page