POST
/
api
/
ai
/
session
/
{ai_session_id}
/
qa
/
create

Authorizations

Authorization
string
headerrequired

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

Path Parameters

ai_session_id
integer
required

The unique ID of the Session in which the new message is to be created

Body

application/json
query
string
required

Your chat message to the AI

chat_model
string

The model of AI to use. Defaults to gpt-3.5-turbo for single-doc chat, and gpt-3.5-turbo-16k for multi-doc chat. Do not change unless you are will to incur potentially much higher costs

language
string
default: English (US)

Desired language of the AI response

meta
object

Metadata, for internal use

restrict_to_context
boolean
default: True

Whether to only use information from the document(s) in this Session

use_cells
boolean
default: True

Whether to use information from AI Cells associated with Documents from this Sesssion

use_context
boolean
default: True

Whether to use information from the document(s) in this Session. Cannot be False if restrict_to_context is True

use_history
boolean
default: True

Whether the new AI response should be related to the previous chat history

use_meta
boolean
default: True

Whether to use the metadata of the document(s) in this Session

Response

200 - application/json
ai_session_id
integer
required

The unique ID of the AI Session this message belongs to

created_at
string
required

Time of message creation, in UTC

id
integer
required

Unique ID of this message

meta
object
required

Metadata, for internal use

query
string
required

The user-provided message to the AI

response
string

The AI's response to the user

task_id
string
required

Task ID for internal use

task_status
string
required

Progress on obtaining a response from the AI

user_id
integer
required

ID of user who submitted the message

user_rating
string
required

User's assessment of the AI response