Skip to main content
POST
Chat Completions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

space_id
integer
required

Body

application/json
session_id
string
required
message
string
required
external_user_id
string
conversation_id
string
stream
boolean
default:false
refine_question
boolean
default:true
copilot
boolean
default:true
dataset_id
string
dataset_ids
string[]
document_id
string
document_ids
string[]
only_dataset_tool
boolean
default:false
context_params
Context Params · object
context_documents_mode
integer
default:1
retrieval_with_websearch
boolean
default:false

Response

Successful Response

message_id
string
required
user_message
string
required
assistant_message
string
required
document_chunks
Document · object[]
token_usage
TotalTokenUsage · object