Converse with a document

POST

Converse with the documents in a conversation.

To query a chatbot, use the Send chatbot query endpoint.

Path parameters

conversation_idstringRequired

The conversation ID.

You can list conversations and get their IDs with the List conversations endpoint.

Headers

IB-ContextstringOptional

Specify whether to use your community account or organization account to complete the request. To use your community account, define as your user ID. To use your organization account, define as your organization ID. If unspecified, defaults to community account context. See Authorization and context identification for details.

Request

This endpoint expects an object.
questionstringRequired

The question to ask the document.

document_idslist of integersRequired

The IDs of the documents to query.

mode"default" or "advanced"Optional
Allowed values: defaultadvanced

The model to use to answer the question. Supports the standard (default) and advanced (advanced) models. See Choosing a model for details about each model.

The multistep model and research mode are not supported.

Response

Successful response, the answer is returned.

prompt_idstringOptional

The ID of the prompt.

answerstringOptional

The answer to the question asked.