POST
/
chat-messages
{
  "event": "message",
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mode": "chat",
  "answer": "<string>",
  "metadata": {
    "usage": {
      "prompt_tokens": 123,
      "prompt_unit_price": "<string>",
      "prompt_price_unit": "<string>",
      "prompt_price": "<string>",
      "completion_tokens": 123,
      "completion_unit_price": "<string>",
      "completion_price_unit": "<string>",
      "completion_price": "<string>",
      "total_tokens": 123,
      "total_price": "<string>",
      "currency": "<string>",
      "latency": 123
    },
    "retriever_resources": [
      {
        "position": 123,
        "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "dataset_name": "<string>",
        "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "document_name": "<string>",
        "segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "score": 123,
        "content": "<string>"
      }
    ]
  },
  "created_at": 123
}

Authorizations

Authorization
string
header
required

API Key authentication.

Body

application/json

Request body to send an advanced chat message.

The body is of type object.

Response

200
application/json

Successful response. The content type and structure depend on the response_mode.

  • blocking: application/json with ChatCompletionResponse.
  • streaming: text/event-stream with ChunkAdvancedChatEvent stream.

Response for blocking mode chat.