AI Assistant

Create a New AI Assistant

POST /api/chatbots/

Request Body

Parameters

Field
Type
Required
Description

name

string

Yes

The name of the bot. In Agent mode, it has semantic meaning. In other modes, it is only used to distinguish different bots.

rag

string (uuid)

No

RAG (Retrieval-Augmented Generation) settings, used to enhance the quality of responses.

largeLanguageModel

string (uuid)

Yes

The large language model used by the bot to generate responses.

embeddingModel

string (uuid)

No

The embedding model used for vectorizing text. This is an optional field.

rerankerModel

string (uuid)

No

instructions

string

No

The bot's role instructions, used to describe the bot's role and behavior.

knowledgeBases

array[IdName]

No

A list of knowledge bases accessible to the bot.

organization

string (uuid)

No

The organization the bot belongs to. If empty, it is a personal bot.

builtInWorkflow

string (uuid)

No

Built-in workflow, used for predefined processing flows.

replyMode

object

No

Reply mode: normal reply or streaming reply. normal: Normal; template: Template; hybrid: Hybrid; workflow: Workflow; agent: Agent.

template

string

No

The template used in Template mode and Hybrid mode.

unanswerableTemplate

string

No

The template used when an answer cannot be provided in Template mode and Hybrid mode.

totalWordsCount

integer (int64)

No

The cumulative total word count used.

outputMode

object

No

Output mode: text, table, or custom format. text: Text; json_schema: JSON Schema.

rawOutputFormat

object

No

The JSON structure definition for a custom output format.

databaseUrl

string

No

Database connection URL (used for database query functionality).

databaseType

string

No

Database type options, including MySQL, PostgreSQL, MSSQL, Oracle.

includeTables

object

No

A list of included tables (used for database query functionality).

groups

array[IdName]

No

A list of groups accessible to the bot.

toolkits

array[ToolSummary]

No

A list of toolkits used by the bot.

tools

array[ToolSummary]

No

A list of tools that can be used by the bot.

agentMode

object

No

Agent mode: normal, SQL, or workflow mode. normal: Normal; canvas: Canvas.

numberOfRetrievedChunks

integer

No

The number of retrieved reference chunks. Default is 12, minimum is 1.

enableEvaluation

boolean

No

enableInLineCitations

boolean

No

Enables the inline citation feature, which will insert citation markers in the format of [1][2] in the response.

Request Structure Example

Request Example Value

Code Examples

Response Body

Status Code: 201

Response Schema Example

Response Example Value


List Embedding Models

GET /api/embedding-models/

Code Examples

Response Body

Status Code: 200

Response Schema Example

Example Response Value


List Reranker Models

GET /api/reranker-models/

Code Examples

Response

Status Code: 200

Response Schema Example

Response Example Value


Get AI Assistant List

GET /api/chatbots/

Parameters

Parameter Name
Required
Type
Description

largeLanguageModel

string

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

pagination

string

Whether to paginate (true/false)

query

string

replyMode

string

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Get a specific AI assistant

GET /api/chatbots/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Chatbot.

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Update AI Assistant

PUT /api/chatbots/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Chatbot.

Request Body

Request Parameters

Field
Type
Required
Description

name

string

Yes

The name of the bot. In Agent mode, it has semantic meaning; in other modes, it is only used to distinguish different bots.

rag

string (uuid)

No

RAG (Retrieval-Augmented Generation) settings, used to enhance the quality of answers.

largeLanguageModel

string (uuid)

Yes

The large language model used by the bot to generate answers.

embeddingModel

string (uuid)

No

The embedding model used for vectorizing text; this is an optional field.

rerankerModel

string (uuid)

No

instructions

string

No

The role instructions for the bot, used to describe its role and behavior.

knowledgeBases

array[IdName]

No

A list of knowledge bases accessible to the bot.

organization

string (uuid)

No

The organization the bot belongs to. If empty, it is a personal bot.

builtInWorkflow

string (uuid)

No

Built-in workflow for predefined processing flows.

replyMode

object

No

Reply mode: normal reply or streaming reply. normal: Normal; template: Template; hybrid: Hybrid; workflow: Workflow; agent: Agent.

template

string

No

The template used in Template mode and Hybrid mode.

unanswerableTemplate

string

No

The template used when Template mode or Hybrid mode cannot provide an answer.

totalWordsCount

integer (int64)

No

The cumulative total word count used.

outputMode

object

No

Output mode: text, table, or custom format. text: Text; json_schema: JSON Schema.

rawOutputFormat

object

No

The JSON structure definition for a custom output format.

databaseUrl

string

No

Database connection URL (for database query functionality).

databaseType

string

No

Database type options, including MySQL, PostgreSQL, MSSQL, Oracle.

includeTables

object

No

A list of included tables (for database query functionality).

groups

array[IdName]

No

A list of groups accessible to the bot.

toolkits

array[ToolSummary]

No

A list of toolkits used by the bot.

tools

array[ToolSummary]

No

A list of tools that can be used by the bot.

agentMode

object

No

Agent mode: normal, SQL, or workflow mode. normal: Normal; canvas: Canvas.

numberOfRetrievedChunks

integer

No

The number of retrieved reference chunks. The default is 12, and the minimum is 1.

enableEvaluation

boolean

No

enableInLineCitations

boolean

No

Enables the inline citation feature, which will insert citation markers in the format of [1][2] in the response.

Request Structure Example

Request Example Value

Code Examples

Response Body

Status Code: 200

Response Schema Example

Example Response Value


Partially Update AI Assistant

PATCH /api/chatbots/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Chatbot.

Request Body

Request Parameters

Field
Type
Required
Description

name

string

No

The name of the bot. In Agent mode, it has semantic meaning. In other modes, it is just used to distinguish different bots.

rag

string (uuid)

No

RAG (Retrieval-Augmented Generation) settings, used to enhance response quality.

largeLanguageModel

string (uuid)

No

The Large Language Model used by the bot to generate responses.

embeddingModel

string (uuid)

No

The embedding model used to vectorize text, an optional field.

rerankerModel

string (uuid)

No

instructions

string

No

The bot's role instructions, used to describe the bot's role and behavior.

knowledgeBases

array[IdName]

No

A list of knowledge bases accessible to the bot.

organization

string (uuid)

No

The organization the bot belongs to. If empty, it is a personal bot.

builtInWorkflow

string (uuid)

No

Built-in workflow, used for predefined processing flows.

replyMode

object

No

Reply mode: normal reply or streaming reply. normal: Normal; template: Template; hybrid: Hybrid; workflow: Workflow; agent: Agent;

template

string

No

The template used in Template mode and Hybrid mode.

unanswerableTemplate

string

No

The template used when unable to answer in Template mode and Hybrid mode.

totalWordsCount

integer (int64)

No

Cumulative total word count used.

outputMode

object

No

Output mode: text, table, or custom format. text: Text; json_schema: JSON Schema;

rawOutputFormat

object

No

JSON structure definition for custom output format.

databaseUrl

string

No

Database connection URL (for database query function).

databaseType

string

No

Database type options, including MySQL, PostgreSQL, MSSQL, Oracle.

includeTables

object

No

List of included tables (for database query function).

groups

array[IdName]

No

A list of groups accessible to the bot.

toolkits

array[ToolSummary]

No

A list of toolkits used by the bot.

tools

array[ToolSummary]

No

A list of tools that can be used by the bot.

agentMode

object

No

Agent mode: Normal, SQL, or Workflow mode. normal: Normal; canvas: Canvas;

numberOfRetrievedChunks

integer

No

The number of retrieved reference chunks, default is 12, minimum is 1.

enableEvaluation

boolean

No

enableInLineCitations

boolean

No

Enables the inline citation feature, which will insert citation markers in the format [1][2] in the response.

Request Structure Example

Request Example Value

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Delete AI Assistant

DELETE /api/chatbots/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Chatbot.

Code Examples

Response

Status Code
Description

204

No response body


Last updated

Was this helpful?