The AISearch Q&A interface answers customer questions using structured element information from the database and content retrieved from the knowledge base.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/aiSearch/searchStream HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Request body parameters. |
|
| question |
string |
Yes |
User question. |
“my net is slow, what can I do?” |
| message |
array |
No |
List of historical conversation records. |
|
| AISearchMessageItem |
No |
Historical conversation record. |
||
| folderId |
string |
Yes |
Folder ID. The knowledge base retrieval feature searches for Q&A content within the current folder and its subfolders. |
1a851c4a-1d65-11ef-99a7-ssfsfdd |
| resourceTypeNeeded |
array |
No |
This list supports three enumeration values: "text" (for knowledge base retrieval), "miniapp" (for miniapp retrieval in structured elements), and "product" (for product retrieval in structured elements). If not specified, all three resource types are retrieved by default. |
|
|
string |
No |
Retrieval resource type. Valid values:
|
“text” |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
ID of the request |
3F21E33A-42F8-50BC-89DE-DC0B96B967DD |
| data | AISearchStreamItem |
Returned data. |
Examples
Success response
JSON format
{
"requestId": "3F21E33A-42F8-50BC-89DE-DC0B96B967DD",
"data": {
"type": "text",
"content": "“network problem can be”",
"params": " [{\"type\": \"miniapp\", \"score\": 0.7404107, \"resourceId\": \"ja9bQZwBg5VwSU7n5Ijs\", \"miniappId\": null, \"title\": \"更新后的智能搜索测试助手\", \"version\": \"1.0.5\", \"description\": \"这是一个用于测试 AI 搜索功能的演示小程序\", \"slogan\": \"搜索即所得\", \"icon\": \"https://img.alicdn.com/test_icon.png\", \"url\": null, \"detailDescription\": \"该小程序提供了完整的 AI 搜索链路测试。\"}]"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.