completions
Generate LLM completion
Generates a completion based on the input messages and retrieval chunks. If the 'stream' parameter is set to true, the response is returned as a stream of plain text (text/plain).
Required roles: All, App
post/completions
Request body
Response
Successful completion. If the 'stream' parameter is false, the response is returned as application/json. If the 'stream' parameter is true, the response is returned as a stream of plain text (text/plain).
Example response
{
"created": 1677649420,
"conversation_id": "550e8400-e29b-41d4-a716-446655440000",
"user_message_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"assistant_message_id": "9b2e6f1a-3c4d-4e5f-8a9b-0c1d2e3f4a5b",
"choices": [
{
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
]
}