Chat (Streamed)

Chat streamed

Chat with your kapa.ai instance. This endpoint returns a streamed response. Calling this endpoint creates a new Thread object in the database and returns the answer to the user's query. A Thread object is a collection of messages in a conversation between the user and the AI model. To ask follow-up questions, use the thread_id returned in the response and call the streamed chat in thread endpoint.

post/query/v1/projects/{project_id}/chat/stream/

Request

  • Base URL: https://api.kapa.ai
  • URL: https://api.kapa.ai/query/v1/projects/{project_id}/chat/stream/
  • Auth: one of:
    • API key in cookie sessionid
    • HTTP bearer
    • API key in header X-API-KEY

Path parameters

project_idstring required

The ID of the project.

Request body

integration_idstring uuid

Optional integration id for the request. Use the ID of the integration that the user is interacting with. If not provided, the conversation may not be included in some statistics that group by integration.

customization_idstring uuid

Optional customization ID. Applies the specified customization to this request.

source_ids_includestring[]

Optional list of source IDs for filtering retrieval data.

source_group_ids_includestring[]

Optional list of source group IDs for filtering retrieval data.

querystring required

The query to ask Kapa.

Response

Streamed response. Note: This is a streaming response, chunks will be received incrementally. Each chunk is delimited by '\u241e' (Unicode Character 'SYMBOL FOR RECORD SEPARATOR'). Clients should split the stream by this delimiter to process individual chunks.

Changes

No recorded changes to this operation across all 1 revision of this API.