Conduct Agent Q&A Dialogue
POST/v1/aibot/bots/:botId/send-message
Conduct Agent Q&A Dialogue
Request
Path Parameters
Agent ID
- application/json
Body
required
- Array [
- ]
User message
history object[]
Conversation history
Message role
Message content
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.
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).
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
- 200
- default
Returned when the Agent conversation succeeds, in SSE format
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
Conversation timestamp
Conversation record ID
Large model type
Large model version
Response type: text: main answer content, thinking: thinking process, search: search results, knowledge: knowledge base
Conversation role, fixed as assistant in the response
Conversation content
Conversation end flag, 'continue' means the conversation is not over, 'stop' means the conversation is over
Deep thinking content (only deepseek-r1 is not an empty string)
usage object
token usage
Indicates the number of tokens in the prompt, remains unchanged across multiple responses
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
Represents the sum of promptTokens and completionTokens
Knowledge base used in the conversation
search_info object
Search result information, requires enabling web search
search_results undefined[]
Search citation information
Citation index
Citation title
Citation URL
{
"created": "1726030224",
"record_id": "record-427d3652",
"model": "hunyuan",
"version": "202407241700",
"type": "assistant",
"role": "assistant",
"content": "Hello",
"finish_reason": "continue",
"reasoning_content": "",
"usage": {
"promptTokens": 10,
"completionTokens": 20,
"totalTokens": 30
},
"knowledge_base": [
""
],
"search_info": {
"search_results": [
{
"index": "[1]",
"title": "Sample Title",
"url": "https://example.com"
}
]
}
}
Returned when Agent conversation fails
- application/json
- Schema
- Example (from schema)
Schema
Error code
Error message
Request ID
{
"code": "INVALID_CREDENTIALS",
"message": "Credentials are invalid",
"requestId": "6360ba4b-f672-434b-9dee-35686a5589a4"
}