Create Chat Completion
This method creates a model response for the given chat conversation, and it is compatible with the OpenAI endpoint for creating a chat completion.
Show optional properties
{
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Hello!",
"role": "user"
}
],
"model": "model-to-use"
}
{
"seed": 0,
"temperature": "number",
"n": 0,
"stop": [
"string"
],
"max_tokens": 0,
"stream": false,
"model": "string",
"messages": [
{
"role": "string",
"content": "string"
}
]
}
Seed to propagate to the LLM for making repeated requests with the same seed as deterministic as possible. Note that this feature is in beta for most inference servers.
temperature
n
stop
max_tokens
stream
ID of the completions model to use.
messages
Successful Response
Invalid model endpoint specified or model endpoint not ready.
Unknown model endpoint requested.
Validation Error
"HTTPValidationError Object"
detail
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"model:"string","messages":["object"]}' https://{api_host}/api/v1/compatibility/openai/v1/chat/completions