Chat/Completions
POST/v1/chat/completions
Chat/Completions
Takes a OpenAI input payload, and then forwards the appropriate request on to the Takeoff server. Note: some OpenAI parameters are not supported, see supported parameters.
See more on the structure of openAI's API here See more on the structure of messages here.
Request​
- application/json
Body
required
Array [
]
frequency_penalty floatnullable
function_call stringnullable
functions string[]nullable
logit_bias
object
nullable
property name* float
logprobs booleannullable
max_tokens int64nullable
messages
object[]
required
content stringrequired
role stringrequired
model stringnullable
n int64nullable
presence_penalty floatnullable
response_format stringnullable
seed int64nullable
stop stringnullable
stream boolean
temperature floatnullable
tool_choice stringnullable
tools stringnullable
top_logprobs int32nullable
top_p floatnullable
user stringnullable
Responses​
- 200
- 400
- 422
- 503
Takes in a JSON payload and returns the response all at once.
- application/json
- Schema
- Example (from schema)
Schema
Array [
- MOD1
- MOD2
Array [
]
]
choices
object[]
required
finish_reason stringrequired
index int32required
logprobs stringrequired
text
object
required
Input Text used for ease of users not to have to use the clunky PayloadText. Mapping provided below to convert InputText to PayloadText.
oneOf
string
string
created int64
id string
model stringrequired
object string
usage string
{
"choices": [
{
"finish_reason": "string",
"index": 0,
"logprobs": "string",
"text": "string"
}
],
"created": 0,
"id": "string",
"model": "string",
"object": "string",
"usage": "string"
}
Bad request
Malformed request body
The server is not ready to process requests yet.
Loading...