The identifier of the model to use. Can be a shared tenancy or custom model identifier.
streamtrueRequired
If set, tokens will be streamed incrementally to users. One or more tokens will be sent as server-sent events (SSE) as they become available. For more information on read above.
best_ofintegerOptionalDefaults to 1
Number of sequences that are generated from the prompt.best_of must be greater than or equal to n.
echobooleanOptional
Echo back the prompt in addition to the completion.
frequency_penaltydoubleOptionalDefaults to 0
Penalizes new tokens based on their frequency in the generated text so far.
ignore_eosbooleanOptional
Whether to ignore the EOS token and continue generating tokens after the EOS token is generated.
log_promptbooleanOptional
OctoAI stores request prompt if True.
logit_biasmap from strings to optional doublesOptional
Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass {'50256': -100} to prevent the <|endoftext|> token from being generated.
loglikelihoodbooleanOptional
Return log probabilities for all prompt tokens excluding the first one from prefill step if True.
logprobsintegerOptional
Number of log probabilities to return per output token.
max_tokensintegerOptionalDefaults to 512
Maximum number of tokens to generate per output sequence.
min_pdoubleOptionalDefaults to 0
Sets a dynamic threshold of the top tokens to consider based on the probability value of the most likely next token. Following https://arxiv.org/abs/2407.01082.
nintegerOptionalDefaults to 1
Number of output sequences to return.
peftstringOptional
Parameter-efficient fine-tuning ID.
presence_penaltydoubleOptionalDefaults to 0
Penalizes new tokens based on whether they appear in the generated text so far.
promptstring or list of strings or list of integers or list of lists of integersOptional
The prompt to generate completions from.
repetition_penaltydoubleOptionalDefaults to 1
Controls the likelihood of the model generating repeated texts.
seedintegerOptionalDefaults to 0
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
stopstring or list of stringsOptional
Generation stop condition.
stream_optionsobjectOptional
If set, usageStats will be streamed on the last content-containing chunk.
suffixstringOptional
The suffix that comes after a completion of inserted text.
temperaturedoubleOptionalDefaults to 1
Controls the randomness of the sampling.
top_pdoubleOptionalDefaults to 1
Controls the cumulative probability of the top tokens to consider.
userstringOptional
A unique identifier representing your end-user.
Response
This endpoint returns a stream of object.
choiceslist of objects
A list of completion choices.
createdinteger
The Unix timestamp (in seconds) of when the completion was created.