v1

latestOpenAPI 3.1.02026-08-06213193627.0 KB
chat

Chat Completions

Perform a Chat Completion request.

post/v1/chat/completions

Request body

modelstring nullable

https://docs.pulze.ai/overview/models Specify the model you'd like Pulze to use. (optional). Can be the full model name, or a subset for multi-matching.

Defaults to our dynamic routing, i.e. best model for this request.

max_tokensinteger nullable

The maximum number of tokens that the response can contain.

temperaturenumber nullable

Optionally specify the temperature for this request only. Leave empty to allow Pulze to guess it for you.

top_pnumber nullable

https://octo.ai/docs/text-gen-solution/rest-api#input-parameters A value between 0.0 and 1.0 that controls the probability of the model generating a particular token.

ninteger nullable

How many completions to generate for each prompt. @default 1

streamboolean nullable

Specify if you want the response to be streamed or to be returned as a standard HTTP request. Currently we only support streaming for OpenAI-compatible models.

logprobsinteger nullable

COMING SOON https://platform.openai.com/docs/api-reference/completions/create#completions/create-logprobs Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens.

presence_penaltynumber nullable
frequency_penaltynumber nullable
best_ofinteger nullable

The number of responses to generate. Out of those, it will return the best n.

logit_biasobject nullable

COMING SOON https://platform.openai.com/docs/api-reference/completions/create#completions/create-logit_bias Modify the likelihood of specified tokens appearing in the completion.

See here for a detailed explanation on how to use: https://help.openai.com/en/articles/5247780-using-logit-bias-to-define-token-probability

pluginsstring[]

The list of plugins to enable for the request

Response

Successful Response

createdinteger

Creation timestamp -- in milliseconds (!)

idstring

This ID gets generated by the database when we save the request

modelstring required

The fully qualified model name used by PulzeEngine

object'text_completion' | 'chat.completion' required

The type of response object