Skip to main content

Conduct Agent Q&A Dialogue

POST 

/v1/aibot/bots/:botId/send-message

Conduct Agent Q&A Dialogue

Request

Path Parameters

    botId stringrequired

    Agent ID

    Example: bot-xxx

Body

required
    msg stringrequired

    User message

    history object[]

    Conversation history

  • Array [
  • role stringrequired

    Message role

    content stringrequired

    Message content

  • ]
  • searchEnable boolean

    Whether to enable online search. Online search is enabled only when both the searchEnable configured in the Agent and this field are set to true.

    files string[]

    Required fields for file-related conversations. Files can be uploaded to Cloud Storage using cloud storage links (cloud://xxx.xxx) or publicly accessible file URLs (https://xxxx.xxxx).

    conversationId string

    Conversation ID. Takes effect after enabling multi-conversation feature, identifying the conversation to which this dialogue belongs. Can be obtained from conversation-related interfaces.

Responses

Returned when the Agent conversation succeeds, in SSE format

Response Headers
  • X-Request-Id string

    Request ID

Schema
    created number

    Conversation timestamp

    record_id string

    Conversation record ID

    model string

    Large model type

    version string

    Large model version

    type string

    Response type: text: main answer content, thinking: thinking process, search: search results, knowledge: knowledge base

    role string

    Conversation role, fixed as assistant in the response

    content string

    Conversation content

    finish_reason string

    Conversation end flag, 'continue' means the conversation is not over, 'stop' means the conversation is over

    reasoning_content string

    Deep thinking content (only deepseek-r1 is not an empty string)

    usage object

    token usage

    promptTokens number

    Indicates the number of tokens in the prompt, remains unchanged across multiple responses

    completionTokens number

    Total tokens in the response. In streaming responses, represents the cumulative total of all completion tokens up to now, continues to accumulate across multiple responses

    totalTokens number

    Represents the sum of promptTokens and completionTokens

    knowledge_base string[]

    Knowledge base used in the conversation

    search_info object

    Search result information, requires enabling web search

    search_results undefined[]

    Search citation information

  • Array [
  • index string

    Citation index

    title string

    Citation title

    url string

    Citation URL

  • ]
Loading...