Ask Question With Multiple Documents

Chat with multiple documents, similar with POST /questions.

Consume one question quota no matter how many documents you ask upon.

Response:

Same as POST /questions.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length between 1 and 3000

question to ask

boolean
Defaults to true

If set, partial message deltas will be sent, like in ChatGPT of OpenAI. Tokens will be sent as data-only server-sent events as they become available.

SelectedMetaWithUploadId | HtmlSelectedMeta

When use Ask About Selected Text, this field is acquired from EVENT_TYPES.CHAT_ICON_CLICKED of our DOCViewerSDK.

history
array of objects
Defaults to

chat history, used for Threaded Chat, this parameter simulates OpenAI' API. history is question and answer pairs, which is a list of ChatMessage objects. The max input tokens of history, selected_meta.material and question is 8000, which is a little less than OpenAI's limit of Embedding models. Sample parameter is as follows:

    [
      {"role": "user", "content": "Who..."},
      {"role": "assistant", "content": "The..."},
      {"role": "user", "content": "Where..."}
      {"role": "assistant", "content": "The..."},
    ]
    
History
boolean
Defaults to true

if true: limit responses to current file's information, else: responses go freely with knowledge of our AI

boolean
Defaults to false

Whether to show the source at the end of each sentence or not. Requires enabling the search_entire_doc setting.

string

preferred language of answer to the question, if not provided, we will try to detect the language automatically, which is flexible and also works well. You'd better use ISO language name, such as English, Chinese. But we can't promise, when AI can't answer your question well, it generally answers in English.

upload_ids
array of strings
required
length between 1 and 30

Type must be a string list of upload ids

Upload Ids*
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json