ChatDoc Conversation API
POSThttps://api.acedata.cloud/chatdoc/conversations

After uploading the document to the repository, you can use this API to create, retrieve, or delete conversations based on this repository.

Request Headers

acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token

Request Body

actionstring
Types of dialogue operations. Optional values are: `chat` (Q&A), `delete` (delete), `retrieve` (retrieve a single entry), `update` (update), `retrieve_batch` (batch retrieve).
Please select
presetstring
Preset model configuration for generating responses.
repository_idstringRequired parameter
The unique identifier of the document repository.
messagesarray
List of messages that make up the current conversation.
questionstringRequired parameter
Questions or prompts that need to be addressed.
knowledge_fallbackboolean
If set to `true`, when the model cannot find an answer from the document, the API will enable a general knowledge fallback strategy to generate a response.
Please select

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

ChatDoc Q&A
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.