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キー認証。すべてのAPIリクエストには、Authorization HTTPヘッダーにAPIキーを Bearer {API_KEY} の形式で含めてください。APIキーはサーバー側に保存し、クライアント側で共有または保存しないことを強くお勧めします。

Body

application/json

チャットメッセージ送信のリクエストボディ。

The body is of type object.

Response

200
application/json

リクエスト成功。応答のコンテントタイプと構造はリクエストの response_mode パラメータに依存します。

  • response_modeblocking の場合、application/json 形式の ChatCompletionResponseJp オブジェクトを返します。
  • response_modestreaming の場合、text/event-stream 形式の ChunkChatflowEventJp オブジェクトのストリームを返します。

ブロッキングモードでの完全なアプリ結果。