summaryrefslogtreecommitdiff
path: root/data/zh_cn/aisearchengine/2026-04-17/api-docs.php
blob: 592d1a1a4af64a12304b4203440cee192eac09cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
<?php return [
    'version' => '1.0',
    'info' => ['style' => 'ROA', 'product' => 'AiSearchEngine', 'version' => '2026-04-17'],
    'directories' => ['EngineSearch', 'GetDatasetResourceUrl', 'ImportDatasetData', 'QaChat'],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'EngineSearch' => [
            'path' => '/api/v1/platform/app/search',
            'methods' => ['post'],
            'schemes' => ['https'],
            'security' => [
                [
                    'AK' => [],
                ],
                [
                    'ApiKey' => [],
                ],
            ],
            'consumes' => ['application/json'],
            'produces' => ['application/json'],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'],
            'parameters' => [
                [
                    'name' => 'body',
                    'in' => 'body',
                    'style' => 'json',
                    'schema' => [
                        'title' => '请求体',
                        'description' => '请求体',
                        'type' => 'object',
                        'properties' => [
                            'appId' => ['title' => '被分发的应用AppId。', 'description' => '应用唯一标识 ID', 'type' => 'string', 'required' => true, 'example' => '2048962366415007746'],
                            'sessionId' => ['title' => '可自定义会话ID。不配置时由服务端生成。若配置则将此配置作为会话ID。仅适用于HEADER_FIELD亲和模式,'."\n"
                                .'格式规范:长度限制[0,64],仅以 **a-zA-Z0-9_** 字符做首字符,非首字符可为 **a-zA-Z0-9_-**。', 'description' => '无需填写', 'type' => 'string', 'required' => false, 'example' => '2e95ef4fbc28437db5008a910bd392a4'],
                            'query' => [
                                'title' => '搜索查询条件',
                                'description' => '查询条件对象',
                                'type' => 'object',
                                'properties' => [
                                    'texts' => [
                                        'title' => '输入文本查询列表',
                                        'description' => '文本查询列表。<br>• 当前仅支持传入 1个 文本字符串,上限为256字符',
                                        'type' => 'array',
                                        'items' => ['title' => '查询具体文本列表', 'description' => '查询具体文本', 'type' => 'string', 'required' => false, 'example' => '女孩收到小红花'],
                                        'required' => false,
                                        'example' => '["梅花图片"]',
                                    ],
                                    'imageUrls' => [
                                        'title' => '输入图片查询列表',
                                        'description' => '图片查询列表。<br>• 当前仅支持传入 1个 图片 URL,单张图大小上限为10MB;格式支持JPG/PNG/WEBP/JPEG',
                                        'type' => 'array',
                                        'items' => ['title' => '图片url连接', 'description' => '图片 URL', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/img.jpg'],
                                        'required' => false,
                                        'example' => '["https://paperreview.oss-cn-hangzhou.aliyuncs.com/59dd424f-97ed-4855-942e-c961f1f5b67e.jpeg"]',
                                    ],
                                    'pageSize' => ['title' => '每页数量,默认20', 'description' => '每页返回的结果数量', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'],
                                    'pageNo' => ['title' => '页码', 'description' => '页码,从 1 开始。<br>• 默认值: `1`', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'],
                                    'excludeIds' => [
                                        'title' => '需要排除的Id列表',
                                        'description' => '需要排除的主键 ID 列表。<br>• 用途: 过滤已浏览过的历史记录',
                                        'type' => 'array',
                                        'items' => ['title' => '召回ID列表', 'description' => '需要排除的主键 ID', 'type' => 'string', 'required' => false, 'example' => 'id_001'],
                                        'required' => false,
                                        'example' => '["24234111","12423525"]',
                                    ],
                                ],
                                'required' => true,
                            ],
                            'grey' => ['title' => '是否访问草稿版本', 'description' => '是否访问草稿版本', 'type' => 'boolean', 'required' => false, 'example' => 'false'],
                            'user' => [
                                'title' => '访问用户信息',
                                'description' => '用户信息对象(用于后续用户视角分析)',
                                'type' => 'object',
                                'properties' => [
                                    'userId' => ['title' => '访问用户ID', 'description' => '用户唯一标识 ID', 'type' => 'string', 'required' => false, 'example' => 'asdfgnoevnor'],
                                ],
                                'required' => false,
                            ],
                        ],
                        'required' => false,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Result<SearchResult>',
                        'description' => 'Result<SearchResult>',
                        'type' => 'object',
                        'properties' => [
                            'code' => ['title' => '结果码。', 'description' => '状态码,200 表示成功', 'type' => 'integer', 'format' => 'int32', 'example' => '200'],
                            'message' => ['title' => '状态码描述。', 'description' => '响应消息', 'type' => 'string', 'example' => 'successful'],
                            'data' => [
                                'title' => '播报视频。',
                                'description' => '业务数据主体',
                                'type' => 'object',
                                'properties' => [
                                    'size' => ['title' => '单页数据条数。', 'description' => '当前页返回数量', 'type' => 'integer', 'format' => 'int32', 'example' => '10'],
                                    'page' => ['title' => '当前页1', 'description' => '搜索分页', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
                                    'total' => ['title' => '产品总数6', 'description' => '总记录数', 'type' => 'integer', 'format' => 'int32', 'example' => '121'],
                                    'traceInfo' => ['title' => '回传日志时使用。'."\n"
                                        ."\n"
                                        .'取值:'."\n"
                                        ."\n"
                                        .'trace_id=ali。', 'description' => '链路追踪信息', 'type' => 'object', 'example' => '{"traceId":"234234324"}'],
                                    'extra' => ['title' => '以JSON格式存储的其他信息', 'description' => '额外元数据 '."\n"
                                        ."\n"
                                        .'> 会有exclude_ids字段,用于表达实际被排除的 ID 列表,对应格式为`Array[String]`'."\n"
                                        .'> - 示例:["id_1", "id_2"]', 'type' => 'object', 'example' => '{exclude_ids: ["id_1", "id_2"]}'],
                                    'items' => [
                                        'title' => '结果对象',
                                        'description' => '搜索结果列表',
                                        'type' => 'array',
                                        'items' => [
                                            'title' => '结果对象',
                                            'description' => '结果对象',
                                            'type' => 'object',
                                            'properties' => [
                                                'id' => ['title' => '权益绑定 ID'."\n", 'description' => '权益绑定 ID'."\n", 'type' => 'string', 'example' => 'iceberg-tbl-b7420156-6d23-4555-8e05-12285b36d6ca'],
                                                'score' => ['title' => '结果对象得分', 'description' => '相关性得分', 'type' => 'number', 'format' => 'float', 'example' => '0.005369'],
                                                'content' => ['title' => '数据内容', 'description' => '内容详情对象(详细结构见下文)', 'type' => 'object', 'example' => '{"titile":"大疆无人机"}'],
                                                'algorithm' => ['title' => '算法内容', 'description' => '算法内容', 'type' => 'object', 'example' => '{"rankScore":1.0}'],
                                                'traceInfo' => ['title' => '回传日志时使用。'."\n"
                                                    ."\n"
                                                    .'取值:'."\n"
                                                    ."\n"
                                                    .'trace_id=ali。', 'description' => '回传日志时使用。'."\n"
                                                    ."\n"
                                                    .'取值:'."\n"
                                                    ."\n"
                                                    .'trace_id=ali。', 'type' => 'object', 'example' => '{"traceId":"12285b36d6ca"}'],
                                            ],
                                        ],
                                    ],
                                    'status' => ['title' => '执行状态'."\n"
                                        .'200:成功'."\n"
                                        .'500:失败'."\n", 'description' => '执行状态'."\n"
                                        .'200:成功'."\n"
                                        .'500:失败'."\n", 'type' => 'string', 'example' => '200'],
                                    'errorMessage' => ['title' => '错误信息', 'description' => '错误信息', 'type' => 'string', 'example' => '搜索词违禁'],
                                    'requestId' => ['title' => '本次请求的响应id', 'description' => '本次请求的响应id', 'type' => 'string', 'example' => '62CC3999-5380-5344-ABC7-46453625A910'],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'staticInfo' => ['returnType' => 'synchronous'],
            'title' => 'AI搜索引擎接口',
            'summary' => 'CleverSee AI搜问平台提供的搜索API接口,支持通过平台搭建搜索应用后,通过应用对应的API调用搜索接口,实现对数据集中图片、文档及音视频内容的精准检索。平台支持文本(自然语言)、图片或图文结合的输入,可快速适配多模态的大规模数据搜索场景,帮助用户高效定位目标内容。',
            'description' => '## 接口说明'."\n"
                ."\n"
                .'当前接口支持[CleverSee AI 搜问平台](https://aisearch.aliyun.com/web-search)上两类搜索应用的调用,包括**图片搜索应用**内的文(自然语言)搜图、图搜图、图文混合搜图,以及**音视频搜索应用**内的文搜音视频、图搜视频、图文混合搜视频。'."\n"
                ."\n"
                .'### 数据源:'."\n"
                ."\n"
                .'支持音频、视频数据,可通过[CleverSee AI 搜问平台](https://aisearch.aliyun.com/web-search)的产品界面内或通过[数据集数据新增/更新 API](https://help.aliyun.com/zh/document_detail/3038471.html?spm=a2c4g.11186623.help-menu-3037946.d_0_2_1_0.54ed1e97NGXVV1&scm=20140722.H_3038471._.OR_help-T_cn~zh-V_1)完成数据上传及更新。'."\n"
                ."\n"
                .'# 认证方式'."\n"
                ."\n"
                .'通过 阿里云 SDK 调用 CleverSee - 智能搜索 服务,具体调用指南请参考:[AI搜索引擎接口](https://api.aliyun.com/document/AiSearchEngine/2026-04-17/EngineSearch)',
            'requestParamsDescription' => '## 请求示例'."\n"
                ."\n"
                .'正常请求示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'```json'."\n"
                .'curl -X POST \'https://pre-ai-search-engine.aliyun-inc.com/api/v1/engine/search\' \\'."\n"
                .'    -H \'Content-Type: application/json\' \\'."\n"
                .'    -H \'X-Acs-Account-Id: 1754376654452940\' \\'."\n"
                .'    -d \'{'."\n"
                .'      "appId": "2048962366415007746",'."\n"
                .'      "query": {'."\n"
                .'        "texts": ["小女孩"],'."\n"
                .'        "imageUrls": ["https://你的图片url"],'."\n"
                .'        "pageSize": 10,'."\n"
                .'        "pageNo": 1,'."\n"
                .'        "excludeIds": []'."\n"
                .'      },'."\n"
                .'      "user": {'."\n"
                .'        "userId": "asdfgnoevnor"'."\n"
                .'      }'."\n"
                .'    }\''."\n"
                .'```',
            'responseParamsDescription' => '### 3.2 `items` 元素结构详解'."\n"
                ."\n"
                .'`items` 数组中的每个对象代表一条搜索结果。根据媒体类型(图片、视频、音频),`content` 字段内的具体属性会有所不同。以下为通用结构及视频/音频特有字段:'."\n"
                ."\n"
                .'#### 图片搜索 `**items**` '."\n"
                ."\n"
                .'| **参数名** |                | **类型** | **说明**                                          | **示例值**                          |'."\n"
                .'| ---------------- | -------------- | -------------- | ------------------------------------------------------- | ----------------------------------------- |'."\n"
                .'| score            |                | Float          | 相关性得分                                              | `0.005369`                              |'."\n"
                .'| content          |                | Object         | 内容详情对象                                            | _(见下级)_                              |'."\n"
                .'| ├─             | image\\_url     | String         | 图片 URL`<br>`• 带签名,时效性为数据集创建内24小时 | `"https://.../image_1.png?Expires=..."` |'."\n"
                .'| ├─             | s\\_name        | String         | 原始文件名                                              | `"image_1.png"`                         |'."\n"
                .'| ├─             | pk\\_id         | String         | 原始资源的主键 ID                                      | `"01KQ...ZX020"`                        |'."\n"
                .'| └─             | s\\_dataset\\_id | String         | 所属数据集 ID                                          | `"594"`                                 |'."\n"
                ."\n"
                .'#### 音视频搜索 `**items**` '."\n"
                ."\n"
                .'| **参数名** |                                | **类型** | **说明**                                                                                                                                                                                                                                                                                                                                                                                         | **示例值**                                                                             |'."\n"
                .'| ---------------- | ------------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- |'."\n"
                .'| score            |                                | Float          | 相关性得分                                                                                                                                                                                                                                                                                                                                                                                             | `0.005369`                                                                                 |'."\n"
                .'| content          |                                | Object         | 内容详情对象                                                                                                                                                                                                                                                                                                                                                                                           | _(见下级)_                                                                                 |'."\n"
                .'| ├─             | s\\_raw\\_cover\\_pic             | String         | 完整视频封面图 URL。`<br>`• 带签名,时效性为数据集创建内24小时`<br>`• 音频/纯文本结果为 `null`                                                                                                                                                                                                                                                                                             | `"https://.../frame_0.jpg?Expires=..."`                                                    |'."\n"
                .'| ├─             | s\\_segment\\_cover\\_pic         | String         | 视频片段封面图 URL。`<br>`• 带签名,时效性为数据集创建内24小时`<br>`• 音频/纯文本结果为 `null`                                                                                                                                                                                                                                                                                             | `"https://.../frame_1.jpg?Expires=..."`                                                    |'."\n"
                .'| ├─             | s\\_raw\\_file\\_path             | String         | 媒体文件 URL。`<br>`• 带签名,时效性为数据集创建内24小时`<br>`• 支持 mp4, mp3, jpg 等                                                                                                                                                                                                                                                                                                     | `"https://.../video.mp4?Expires=..."`                                                      |'."\n"
                .'| ├─             | s\\_name                        | String         | 原始文件名                                                                                                                                                                                                                                                                                                                                                                                             | `"video_001.mp4"`                                                                          |'."\n"
                .'| ├─             | pk\\_id                         | String         | 原始资源的主键 ID                                                                                                                                                                                                                                                                                                                                                                                     | `"01KQ...ZX020"`                                                                           |'."\n"
                .'| ├─             | s\\_dataset\\_id                 | String         | 所属数据集 ID                                                                                                                                                                                                                                                                                                                                                                                         | `"594"`                                                                                    |'."\n"
                .'| ├─             | s\\_segment\\_start\\_millisecond | Integer        | 片段起始时间(毫秒)`<br>`• 非视频/音频片段可能为 0                                                                                                                                                                                                                                                                                                                                               | `10000`                                                                                    |'."\n"
                .'| ├─             | s\\_segment\\_end\\_millisecond   | Integer        | 片段结束时间(毫秒)`<br>`• 非视频/音频片段可能为 0                                                                                                                                                                                                                                                                                                                                               | `20000`                                                                                    |'."\n"
                .'| ├─             | s\\_raw\\_length                 | Integer        | 文件时长                                                                                                                                                                                                                                                                                                                                                                                               | `146046`                                                                                   |'."\n"
                .'| ├─             | s\\_video\\_type                 | String         | 视频类型标签`<br>`• 视频类别,是AI理解的视频级标签,值类型可枚举,为以下值其中之一:`<br>课堂录播`, `微课/慕课`, `科普解说`, `技能教程`, `新闻播报`, `访谈/演讲`, `纪录片`, `现场报道`, `宣传片/广告`, `发布会`, `产品演示`, `Vlog/日常`, `影视综艺`, `游戏实况`, `短剧/搞笑`, `美食/旅游`, `音乐舞蹈`, `体育赛事`, `晚会/演出`, `其他` | `课堂录播`                                                                                 |'."\n"
                .'| ├─             | s\\_video\\_topic                | String         | 视频主题标签`<br>`• 视频的核心话题,是AI理解的视频级标签,值类型不可枚举                                                                                                                                                                                                                                                                                                                           | `单机游戏实况`                                                                             |'."\n"
                .'| ├─             | s\\_global\\_summary             | String         | 全局摘要标签`<br>`• 视频内容的核心总结,是AI理解的视频级标签,值类型不可枚举                                                                                                                                                                                                                                                                                                                       | `本视频详细测评了XX品牌最新款智能手机的各项性能,重点展示了其夜景拍照能力与游戏散热表现。` |'."\n"
                .'| └─             | s\\_global\\_keywords            | String         | 全局关键词标签`<br>`• 概括视频内容的2-4个关键词,是AI理解的视频级标签,值类型不可枚举                                                                                                                                                                                                                                                                                                              | `手机测评, 性能测试`                                                                      |'."\n"
                ."\n"
                .'## 返回示例'."\n"
                ."\n"
                .'### 正常图片搜索返回示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'```json'."\n"
                .'  {'."\n"
                .'    "code": 200,'."\n"
                .'    "message": "success",'."\n"
                .'    "data": {'."\n"
                .'      "size": 1,'."\n"
                .'      "page": 1,'."\n"
                .'      "total": 1,'."\n"
                .'      "traceInfo": null,'."\n"
                .'      "extra": {'."\n"
                .'        "exclude_ids": ["3f95b343xxxxxxxxxxxx"]'."\n"
                .'      },'."\n"
                .'      "items": ['."\n"
                .'        {'."\n"
                .'          "id": "3f95b343xxxxxxxxxxxx",'."\n"
                .'          "score": 0.8029279573006508,'."\n"
                .'          "content": {'."\n"
                .'            "s_name": "sample_image.png",'."\n"
                .'            "image_url": "https://.../image.png?Expires=...",'."\n"
                .'            "pk_id": "3f95b343xxxxxxxxxxxx",'."\n"
                .'            "s_dataset_id": "594"'."\n"
                .'          },'."\n"
                .'          "algorithm": {},'."\n"
                .'          "traceInfo": null'."\n"
                .'        }'."\n"
                .'      ],'."\n"
                .'      "status": "200",'."\n"
                .'      "errorMessage": null'."\n"
                .'    },'."\n"
                .'    "requestId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"'."\n"
                .'  }'."\n"
                .'```'."\n"
                ."\n"
                .'### 正常视频搜索返回示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "code": 200,'."\n"
                .'  "data": {'."\n"
                .'    "total": 1,'."\n"
                .'    "size": 1,'."\n"
                .'    "traceInfo": null,'."\n"
                .'    "extra": {'."\n"
                .'      "exclude_ids": ["01XXXXXXXXXXXXXXX"]'."\n"
                .'    },'."\n"
                .'    "errorMessage": null,'."\n"
                .'    "page": 1,'."\n"
                .'    "items": [{'."\n"
                .'      "score": 0.577594,'."\n"
                .'      "traceInfo": null,'."\n"
                .'      "id": "01XXXXXXXXXXXXXXX",'."\n"
                .'      "content": {'."\n"
                .'        "s_raw_file_path": "https://.../video.mp4?Expires=...",'."\n"
                .'        "s_raw_length": 1036122,'."\n"
                .'        "pk_id": "01XXXXXXXXXXXXXXX",'."\n"
                .'        "s_global_summary": "视频前半段围绕人物之间的冲突与协作展开,通过多段剧情推进呈现复杂关系与情绪变化,包含追逐、对话、调查等情节;后半段切换为舞台表演内容,展示歌手在大型活动中的现场演唱与观众互动,整体内容兼具剧情叙事与音乐演出元素。",'."\n"
                .'        "s_raw_cover_pic": "https://.../frame_1.jpg?Expires=...",'."\n"
                .'        "s_name": "demo_video.mp4",'."\n"
                .'        "s_dataset_id": "833",'."\n"
                .'        "s_global_keywords": "剧情互动,人物关系,调查追逐,音乐表演,舞台演唱",'."\n"
                .'        "s_video_topic": "剧情内容与音乐演出",'."\n"
                .'        "s_video_type": "影视综艺"'."\n"
                .'      },'."\n"
                .'      "algorithm": {}'."\n"
                .'    }],'."\n"
                .'    "status": "200"'."\n"
                .'  },'."\n"
                .'  "requestId": "xxxxxxxxxxxxxxxxxxxxxxxx",'."\n"
                .'  "message": "success"'."\n"
                .'}'."\n"
                .'```'."\n"
                ."\n"
                .'## 错误码'."\n"
                ."\n"
                .'| **HTTP状态码** | **错误码(枚举名)** | **错误 Message(英文)**           | **中文说明**           |'."\n"
                .'| -------------------- | -------------------------- | ----------------------------------------- | ---------------------------- |'."\n"
                .'| 500                  | `SYSTEM_ERROR`           | `system inner error`                  | 系统内部错误                 |'."\n"
                .'| 403                  | `APP_FORBIDDEN`          | `no permission to access this app` | 权限不足,无法访问该应用     |'."\n"
                .'| 400                  | `INVALID_PARAM`          | `invalid parameter`                    | 参数错误                     |'."\n"
                .'| 404                  | `APP_NOT_FOUND`          | `app not found`                       | 应用不存在                   |'."\n"
                .'| 407                  | `APP_ACCESS_UNAVAILABLE` | `app access privilege escalation`    | 应用访问越权(权限提升异常) |'."\n"
                .'| 405                  | `INPUT_TOO_LONG`         | `input text exceeds maximum length` | 输入文本过长                 |'."\n"
                .'| 406                  | `IMAGE_LIMIT_EXCEEDED`   | `image count exceeds maximum limit` | 图片数量超过限制             |'."\n"
                ."\n"
                .'# 搜索结果中多媒体资源(图片、视频)URL获取预签名 API'."\n"
                ."\n"
                .'如需获取数据集内数据url链接并进行下载,请参考[搜索结果中多媒体资源(图片、视频)URL获取预签名 API](https://help.aliyun.com/zh/document_detail/3039566.html?spm=a2c4g.11186623.help-menu-3037946.d_0_2_1_1.2d961e97iV5opr&scm=20140722.H_3039566._.OR_help-T_cn~zh-V_1)',
            'changeSet' => [],
            'ramActions' => [
                [
                    'operationType' => 'create',
                    'ramAction' => [
                        'action' => 'aisearchengine:EngineSearch',
                        'authLevel' => 'operate',
                        'actionConditions' => [],
                        'resources' => [
                            ['validationType' => 'always', 'product' => 'AiSearchEngine', 'resourceType' => '全部资源', 'arn' => '*'],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"code\\": 200,\\n  \\"message\\": \\"successful\\",\\n  \\"data\\": {\\n    \\"size\\": 10,\\n    \\"page\\": 1,\\n    \\"total\\": 121,\\n    \\"traceInfo\\": {\\n      \\"traceId\\": \\"234234324\\"\\n    },\\n    \\"extra\\": {\\n      \\"test\\": \\"test\\",\\n      \\"test2\\": 1\\n    },\\n    \\"items\\": [\\n      {\\n        \\"id\\": \\"iceberg-tbl-b7420156-6d23-4555-8e05-12285b36d6ca\\",\\n        \\"score\\": 0.005369,\\n        \\"content\\": {\\n          \\"titile\\": \\"大疆无人机\\"\\n        },\\n        \\"algorithm\\": {\\n          \\"rankScore\\": 1\\n        },\\n        \\"traceInfo\\": {\\n          \\"traceId\\": \\"12285b36d6ca\\"\\n        }\\n      }\\n    ],\\n    \\"status\\": \\"200\\",\\n    \\"errorMessage\\": \\"搜索词违禁\\",\\n    \\"requestId\\": \\"62CC3999-5380-5344-ABC7-46453625A910\\"\\n  }\\n}","type":"json"}]',
        ],
        'GetDatasetResourceUrl' => [
            'path' => '/api/v1/dataset/open/resources',
            'methods' => ['post'],
            'schemes' => ['https'],
            'security' => [
                [
                    'AK' => [],
                ],
                [
                    'ApiKey' => [],
                ],
            ],
            'consumes' => ['application/json'],
            'produces' => ['application/json'],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'],
            'parameters' => [
                [
                    'name' => 'body',
                    'in' => 'body',
                    'style' => 'json',
                    'schema' => [
                        'description' => '请求Body。',
                        'type' => 'object',
                        'properties' => [
                            'datasetId' => ['description' => '数据集 ID,可在控制台数据集列表中查看。', 'type' => 'string', 'format' => 'int64', 'required' => true, 'example' => '730'],
                            'primaryKey' => ['description' => '数据集中的数据记录主键值。', 'type' => 'string', 'required' => true, 'example' => '01KQCJBPM9JVDTXWV50G2AKXXX'],
                        ],
                        'required' => false,
                        'example' => '{'."\n"
                            .'  "datasetId": 730,'."\n"
                            .'  "primaryKey": "01KQCJBPM9JVDTXWV50G2AKXXX"'."\n"
                            .'}',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Result<DatasetOpenResourceVO>',
                        'description' => 'Result<DatasetOpenResourceVO>',
                        'type' => 'object',
                        'properties' => [
                            'code' => ['description' => '业务状态码。`200` 表示请求成功,其他值表示异常,详见错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'],
                            'message' => ['description' => '状态描述。成功时为 "success",失败时为具体的错误信息。', 'type' => 'string', 'example' => 'success'],
                            'data' => [
                                'description' => '业务数据主体',
                                'type' => 'object',
                                'properties' => [
                                    'url' => ['description' => '带有签名和过期时间的 OSS 临时访问链接(24 小时内有效),可直接用于前端展示或下载', 'type' => 'string', 'example' => 'https://maas-ai-search-center-raw.oss-cn-hangzhou.aliyuncs.com/.../sample.mp4...'],
                                ],
                            ],
                            'requestId' => ['description' => '请求唯一标识,用于问题排查', 'type' => 'string', 'example' => '1a0f40dd17774641794394269ec0e9'],
                        ],
                    ],
                ],
            ],
            'staticInfo' => ['returnType' => 'synchronous'],
            'title' => '获取资源临时URL',
            'summary' => '通过该接口,您可获取您数据集中图片、音视频资源的可公网访问临时 URL 地址。',
            'description' => '根据数据集 ID 和数据主键,获取存储在 AI 搜索平台 中的底层媒体资源(如音视频、图片)临时安全访问链接,可直接用于前端展示或下载。'."\n"
                ."\n"
                .'重点用途: AI 搜索平台 所创建好的 搜索应用,在通过 搜索 API 调用时,结果返回的图片、音视频结果 URL 均为预签名链接,具有一定的有效期(24 小时)。若您的应用在本地持久化存储了这些 URL,后续访问时可能因过期而失效。在这种情况下,可调用本接口,传入对应的数据集 ID 和数据记录主键,即可获取该资源的最新有效访问链接。',
            'responseParamsDescription' => '### 响应示例'."\n"
                ."\n"
                .'#### 成功响应'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "code": 200,'."\n"
                .'  "message": "success",'."\n"
                .'  "data": {'."\n"
                .'    "url": "https://maas-ai-search-center-raw.oss-cn-hangzhou.aliyuncs.com/.../sample.mp4..."'."\n"
                .'  },'."\n"
                .'  "requestId": "1a0f40da17774667074596639ec2b6"'."\n"
                .'}'."\n"
                ."\n"
                .'```'."\n"
                ."\n"
                .'### 错误码'."\n"
                ."\n"
                .'| 错误码 | message | 说明 | 建议处理方式 |'."\n"
                .'| --- | --- | --- | --- |'."\n"
                .'| 400 | `datasetId: must not be null`  | 请求参数不完整或格式错误。例如,缺少必需的 `datasetId` 参数。 | 检查您的请求,确保所有必填参数都已提供且格式正确。 |'."\n"
                .'| 403 | `Access denied` | 访问被拒绝,通常是由于身份验证失败或权限不足。 | 检查您的 Access Key 或其他认证信息是否正确,并确认您有操作该资源的权限。 |'."\n"
                .'| 404 | `Dataset not found` | 指定的数据集不存在。 | 请检查请求中的 `datasetId` 是否正确。 |'."\n"
                .'| 404 | `Resource not found` | 指定主键值在目标数据集内无对应记录 | 请检查请求中指定的资源 primaryKey 是否正确。 |'."\n"
                .'| 404 | `Resource file not found` | 指定主键值存在,但 rawFilePath 字段为空、或 OSS 预签名 URL 生成为空(文件异常或被删除),指定的资源文件不存在。 | 请检查请求中指定的文件是否正确存储,请检查存储资源是否正常。 |'."\n"
                .'| 500 | `Internal server error` | 服务器内部发生未知错误。 | 请稍后重试。如果问题持续存在,请联系技术支持。 |',
            'changeSet' => [],
            'ramActions' => [],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"code\\": 200,\\n  \\"message\\": \\"success\\",\\n  \\"data\\": {\\n    \\"url\\": \\"https://maas-ai-search-center-raw.oss-cn-hangzhou.aliyuncs.com/.../sample.mp4...\\"\\n  },\\n  \\"requestId\\": \\"1a0f40dd17774641794394269ec0e9\\"\\n}","type":"json"}]',
        ],
        'ImportDatasetData' => [
            'summary' => '支持实时向特定数据集中新增或更新数据。系统会依据目标数据集主键值、和新数据记录主键值(如 “pk_id” = “2026aa01”)匹配:若主键值匹配成功,则更新该条数据记录;若匹配不存在,则新增该条数据记录。',
            'path' => '/api/v1/dataset/open/upsert',
            'methods' => ['post'],
            'schemes' => ['https'],
            'security' => [
                [
                    'AK' => [],
                ],
                [
                    'ApiKey' => [],
                ],
            ],
            'consumes' => ['application/json'],
            'produces' => ['application/json'],
            'operationType' => 'write',
            'deprecated' => false,
            'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'],
            'parameters' => [
                [
                    'name' => 'body',
                    'in' => 'body',
                    'style' => 'json',
                    'schema' => [
                        'description' => '请求体。',
                        'type' => 'object',
                        'properties' => [
                            'datasetId' => ['description' => '数据集 ID,可在控制台数据集列表中查看。', 'type' => 'string', 'format' => 'int64', 'required' => true, 'example' => '730'],
                            'records' => [
                                'description' => '新增或更新的数据列表。一次批量操作最多不超过 100 条。'."\n"
                                    ."\n"
                                    .'说明: 传入的 records 必须完全参照目标数据集在控制台配置的 Schema。具体的 新增/更新 逻辑取决于目标数据集的主键类型。详细示例请求见下方「请求说明」',
                                'type' => 'array',
                                'items' => [
                                    'description' => '具体数据项。',
                                    'type' => 'object',
                                    'required' => false,
                                    'additionalProperties' => ['type' => 'any', 'example' => '['."\n"
                                        .'      { '."\n"
                                        .'        "pk_id": "01KQCJXXX",'."\n"
                                        .'        "video_url": "https://sample.aliyuncs.com/path/test_1.mp4",'."\n"
                                        .'        "name": "new-test.mp4"'."\n"
                                        .'      }'."\n"
                                        .']', 'description' => '数据项可以是任意格式。'],
                                ],
                                'required' => true,
                            ],
                        ],
                        'required' => false,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Result<DatasetImportTaskVO>',
                        'description' => 'Result<DatasetImportTaskVO>',
                        'type' => 'object',
                        'properties' => [
                            'code' => ['description' => '业务状态码。200 表示请求成功,其他值表示异常,详见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'],
                            'message' => ['description' => '状态描述。', 'type' => 'string', 'example' => 'success'],
                            'data' => ['description' => '返回的数据主体,使用空占位符。', 'type' => 'object', 'example' => '[]'],
                            'requestId' => ['description' => '请求唯一标识,用于问题排查。', 'type' => 'string', 'example' => '1a0f40dd17774641794394269ec0e9'],
                        ],
                    ],
                ],
            ],
            'staticInfo' => ['returnType' => 'synchronous'],
            'title' => '向数据集导入数据',
            'description' => '**典型使用场景**'."\n"
                ."\n"
                .'| 场景 | 说明 |'."\n"
                .'| --- | --- |'."\n"
                .'| 数据实时新增 | 业务系统产生新数据时,实时推送到 AI 搜索平台 |'."\n"
                .'| 状态更新 | 业务端数据发生变更(如标题修改、状态下架)时,及时更新 |'."\n"
                ."\n"
                .'**前置说明**'."\n"
                ."\n"
                .'- **主键处理**:根据目标数据集的主键类型(用户自定义或系统生成)来决定是执行新增还是更新操作。'."\n"
                .'- **批量限制**:单次请求最多可处理100条记录。'."\n"
                .'- **Schema匹配**:传入的`records`字段必须完全参照目标数据集在控制台配置的Schema。'."\n"
                .'- **权限要求**:确保拥有足够的权限对目标数据集进行写入或更新操作。'."\n"
                .'- **状态检查**:在发起请求前,请确认目标数据集处于可写状态,而非只读模式。',
            'requestParamsDescription' => '#### 重要提示: records 数组内对象的字段要求:'."\n"
                ."\n"
                .'传入的字段必须完全参照目标数据集在控制台配置的 Schema。具体的新增/ 更新路由逻辑取决于目标数据集的主键类型,分为以下两种情况。'."\n"
                ."\n"
                .'##### 情况一:用户自定义主键'."\n"
                ."\n"
                .'假设用户在创建 datasetId 为 730 的数据集时,自定义了主键字段为 business\\_pk\\_id,则每条 records 中必须包含该**主键字段**及其对应的值。系统会根据主键值匹配目标数据集中的已有数据:'."\n"
                ."\n"
                .'*   若未匹配到,则执行**新增**操作。'."\n"
                .'    '."\n"
                .'*   若匹配成功,则执行**更新**操作。'."\n"
                .'    '."\n"
                ."\n"
                .'**示例情景1:新增一条数据**'."\n"
                ."\n"
                .'调用本API时,请求参数 records 中带有一行数据“business_pk_id”="NEW_ID_101",由于系统在数据集中**未找到** business\\_pk\\_id = "NEW\\_ID\\_101" 的记录 ,因此**执行新增**。'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "datasetId": 730,'."\n"
                .'  "records": ['."\n"
                .'    {'."\n"
                .'      "business_pk_id": "NEW_ID_101",'."\n"
                .'      "name": "new-video.mp4",'."\n"
                .'      "video_url": "https://example.com/new-video.mp4"'."\n"
                .'    }'."\n"
                .'  ]'."\n"
                .'}'."\n"
                .'```'."\n"
                ."\n"
                .'**示例情景2:更新一条已有数据**'."\n"
                ."\n"
                .'调用本API时,请求参数 records 中带有一行数据“business_pk_id”="01KQCJBPM9JVDTXWV50G2AKXX",由于系统在数据集中**找到了 **business\\_pk\\_id = "01KQCJBPM9JVDTXWV50G2AKXX" 的记录 ,因此**执行更新**。'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "datasetId": 730,'."\n"
                .'  "records": ['."\n"
                .'    {'."\n"
                .'      "business_pk_id": "01KQCJBPM9JVDTXWV50G2AKXXX",'."\n"
                .'      "name": "updated-video.mp4",'."\n"
                .'      "video_url": "https://example.com/updated-video.mp4"'."\n"
                .'    }'."\n"
                .'  ]'."\n"
                .'}'."\n"
                .'```'."\n"
                ."\n"
                .'##### 情况二:系统自动生成主键(pk\\_id)'."\n"
                ."\n"
                .'假设用户在创建 datasetId 为 750 的数据集时,选择使用系统自动生成的主键字段 pk\\_id。API 会根据参数 records 中记录是否携带 pk\\_id 字段进行分流处理:'."\n"
                ."\n"
                .'*   **携带** pk\\_id:系统将其视为更新操作,并在目标数据集中查找与该 pk\\_id 匹配的数据。若匹配成功则执行更新;若未匹配到,则返回 404 错误。'."\n"
                .'    '."\n"
                .'*   **不携带** pk\\_id:系统将其视为新增操作,并自动为该条 Record 生成新的 pk\\_id 値。'."\n"
                .'    '."\n"
                ."\n"
                .'**示例情景1:更新一条已有数据**'."\n"
                ."\n"
                .'携带 pk\\_id ,系统在数据集中匹配到对应记录,则执行更新。若未匹配到,则返回错误。'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "datasetId": 750,'."\n"
                .'  "records": ['."\n"
                .'    {'."\n"
                .'      "pk_id": "01KQCJBPM9JVDTXWV50G2AKXXX",'."\n"
                .'      "name": "updated-video.mp4",'."\n"
                .'      "video_url": "https://example.com/updated-video.mp4"'."\n"
                .'    }'."\n"
                .'  ]'."\n"
                .'}'."\n"
                .'```'."\n"
                ."\n"
                .'**示例情景2:新增一条数据**'."\n"
                ."\n"
                .'未携带 pk\\_id ,系统将该条记录视为新增,并自动生成 pk\\_id。'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "datasetId": 750,'."\n"
                .'  "records": ['."\n"
                .'    {'."\n"
                .'      "name": "new-video.mp4",'."\n"
                .'      "video_url": "https://example.com/new-video.mp4"'."\n"
                .'    }'."\n"
                .'  ]'."\n"
                .'}'."\n"
                .'```',
            'responseParamsDescription' => '### 响应示例'."\n"
                ."\n"
                .'#### 成功响应'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "code": 200,'."\n"
                .'  "message": "success",'."\n"
                .'  "data": {},'."\n"
                .'  "requestId": "1a0f40dd17774641794394269ec0e9"'."\n"
                .'}'."\n"
                ."\n"
                .'```'."\n"
                .'---'."\n"
                ."\n"
                .'## 错误码'."\n"
                ."\n"
                .'| 错误码 | message | 说明 | 建议处理方式 |'."\n"
                .'| --- | --- | --- | --- |'."\n"
                .'| 400 | `datasetId: must not be null`等 | 请求参数不完整或格式错误。例如,缺少必需的 `datasetId` 参数。 | 检查您的请求,确保所有必填参数都已提供且格式正确。 |'."\n"
                .'| 400 | `Dataset is not ready, current status: {status}` | 目标数据集尚未准备就绪,无法接收数据。 | 请等待一段时间后重试,或在操作前检查数据集的状态。 |'."\n"
                .'| 400 | `Dataset schema is not configured` | 目标数据集没有配置数据结构(Schema)。 | 在上传数据前,请先为数据集定义并配置好相应的 Schema。 |'."\n"
                .'| 400 | `Exceeds maximum batch size of 100 records per request` | 单次请求上传的记录数量超过了 100 条的限制。 | 将您的数据分批处理,确保每个请求的记录数不超过 100 条。 |'."\n"
                .'| 400 | `records[{i}] cannot be empty` | 请求中的某条记录为空。 | 检查请求体中的 `records` 数组,确保其中没有空对象或空值。 |'."\n"
                .'| 400 | `records[{i}]: ...` | 请求中的某条记录数据不符合预设的 Schema 规范。 | 根据错误提示,检查并修正对应记录的字段名、数据类型等信息。 |'."\n"
                .'| 403 | `Dataset is read-only` | 目标数据集处于只读模式,不允许写入或更新操作。 | 请确认您是否有权限修改该数据集,或联系数据集管理员。 |'."\n"
                .'| 403 | `Access denied` | 访问被拒绝,通常是由于身份验证失败或权限不足。 | 检查您的 Access Key 或其他认证信息是否正确,并确认您有操作该资源的权限。 |'."\n"
                .'| 404 | `Dataset not found` | 指定的数据集不存在。 | 请检查请求中的 `datasetId` 是否正确。 |'."\n"
                .'| 404 | `pk_id not found` | 指定的数据集存在,但用户传入的`pk_id`不存在 。 | 请检查请求对应的 `datasetId` 中,是否存在相应 `pk_id`。 |'."\n"
                .'| 500 | `Internal server error` | 服务器内部发生未知错误。 | 请稍后重试。如果问题持续存在,请联系技术支持。 |',
            'changeSet' => [],
            'ramActions' => [],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"code\\": 200,\\n  \\"message\\": \\"success\\",\\n  \\"data\\": [],\\n  \\"requestId\\": \\"1a0f40dd17774641794394269ec0e9\\"\\n}","type":"json"}]',
        ],
        'QaChat' => [
            'summary' => '基于强大的全模态搜索与理解能力,依托 CleverSee AI 搜问平台构建问答应用,实现对数据集中图片、文档与视频内容的深度理解与精准问答。平台支持灵活定制问答助手的回复风格与交互方式,能够快速适配多样化的大规模数据问答场景。用户可通过文本、图片或图文结合的方式发起提问,平台能够结合完整数据集进行深度语义理解,并输出文本、图片、视频等多种形式的回答结果。针对视频素材,平台还提供模板化输出能力,可定制化生成内容总结、信息提炼及视频脚本等结果。',
            'path' => '/api/v1/platform/app/chat',
            'methods' => ['post'],
            'schemes' => ['https', 'sse'],
            'security' => [
                [
                    'AK' => [],
                ],
                [
                    'ApiKey' => [],
                ],
            ],
            'consumes' => ['application/json'],
            'produces' => ['text/event-stream', 'application/json'],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'],
            'parameters' => [
                [
                    'name' => 'body',
                    'in' => 'body',
                    'style' => 'json',
                    'schema' => [
                        'title' => '请求Body。',
                        'description' => '请求Body。',
                        'type' => 'object',
                        'properties' => [
                            'appId' => ['title' => '搜索应用ID', 'description' => '应用ID', 'type' => 'string', 'required' => true, 'example' => '2052929167853146113'],
                            'sessionId' => ['title' => '问答会话ID,用于记录同一个用户的多次问答。', 'description' => '问答会话ID,用于记录同一个用户的多次问答。', 'type' => 'string', 'required' => false, 'example' => 'req_123456789'],
                            'message' => [
                                'title' => '用户消息对象,包含角色和多模态内容。',
                                'description' => '用户消息对象,包含角色和多模态内容。',
                                'type' => 'object',
                                'properties' => [
                                    'role' => ['title' => '消息角色,当前仅支持 user', 'description' => '消息角色,当前仅支持 `"user"`角色', 'type' => 'string', 'required' => false, 'example' => 'user'],
                                    'parts' => [
                                        'title' => '多模态输入列表',
                                        'description' => '单个内容块,根据 `type` 区分类型',
                                        'type' => 'array',
                                        'items' => [
                                            'title' => '多模态输入Obj',
                                            'description' => '多模态输入Obj',
                                            'type' => 'object',
                                            'properties' => [
                                                'type' => [
                                                    'title' => 'text-文本,file-图文视频',
                                                    'description' => '内容块类型固定值,仅支持`"text"` / `"file"` / `"data"`',
                                                    'type' => 'string',
                                                    'required' => false,
                                                    'enumValueTitles' => ['file' => 'file', 'data' => 'data', 'text' => 'text'],
                                                    'example' => 'text',
                                                ],
                                                'text' => ['title' => '用户文本输入', 'description' => '当 `type="text"` 时必填。'."\n"
                                                    ."\n"
                                                    .'* 文本内容,上限1024字符', 'type' => 'string', 'required' => false, 'example' => '请问这个视频讲了什么?'],
                                                'url' => ['title' => '文件资源地址', 'description' => '当 `type="file"` 时必填。支持以下两种类型,格式支持 JPG/PNG/WEBP/JPEG:'."\n"
                                                    ."\n"
                                                    .'• 媒体资源cdn地址,当前支持图片,上限5张;'."\n"
                                                    .'• 图片编码,使用base64编码字符串上传图像文件(支持位图格式),上限5张', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/img.jpg'],
                                                'mediaType' => ['title' => '图文视频类型', 'description' => '当 `type="file"` 时必填。'."\n"
                                                    ."\n"
                                                    .'* 媒体类型,当前仅支持图片格式 JPG/PNG/WEBP/JPEG,上限5张', 'type' => 'string', 'required' => false, 'example' => 'image/png'],
                                                'data' => ['title' => '结构化输入,暂不支持使用', 'description' => '当 type = "data" 时,data 对象为必填。 data 对象结构说明如下:'."\n"
                                                    ."\n"
                                                    .'- type:字符串类型,必填,表示数据子类型。当前支持的值为 "template",表示视频模板。'."\n"
                                                    .'- videoId:字符串类型,条件必填。仅当 type = "template" 时需要填写,表示视频模板 ID;其他类型下可以忽略或填写为 null。', 'type' => 'any', 'required' => false, 'example' => '{'."\n"
                                                    .'  "type": "template",'."\n"
                                                    .'  "videoId": "xxxx"'."\n"
                                                    .'}'],
                                            ],
                                            'required' => false,
                                        ],
                                        'required' => false,
                                    ],
                                ],
                                'required' => true,
                            ],
                            'options' => ['title' => '扩展参数。'."\n"
                                .'——目前仅支持debug,false表示使用问答应用的草稿版本,ture表示使用问答应用的在线版本', 'description' => '无需填写', 'type' => 'object', 'required' => false, 'example' => '{'."\n"
                                .'  "debug": true'."\n"
                                .'}'],
                        ],
                        'required' => false,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'event' => ['title' => '事件类型说明:'."\n"
                                ."\n"
                                .'1. 生命周期'."\n"
                                .'   - start / finish'."\n"
                                .'   - 标记消息的开始和结束'."\n"
                                ."\n"
                                .'2. 文本内容'."\n"
                                .'   - text-start / text-delta / text-end'."\n"
                                .'   - Markdown 文本流式输出'."\n"
                                ."\n"
                                .'3. 内联媒体'."\n"
                                .'   - data-image-info / data-video-info'."\n"
                                .'   - 图文混排/视频文字混排中的媒体卡片'."\n"
                                ."\n"
                                .'4. 信源引用'."\n"
                                .'   - data-reference'."\n"
                                .'   - 统一信源列表(web / document / image / video)'."\n"
                                ."\n"
                                .'5. 行内引用'."\n"
                                .'   - data-document-ref'."\n"
                                .'   - Perplexity 风格行内文档引用'."\n"
                                ."\n"
                                .'6. 模板视频'."\n"
                                .'   - data-template-video'."\n"
                                .'   - AV 模板化 agent 输出的视频卡片'."\n"
                                ."\n"
                                .'7. 模板分析'."\n"
                                .'   - data-video-info / data-template-info / data-template-video-content'."\n"
                                .'   - AV 模板化 agent 的分析结果数据'."\n"
                                .'   - "语音转录""视频纲要""视频转脚本"等表格型模板通过 data-template-video-content 一次性下发'."\n"
                                ."\n"
                                .'8. 流式 JSON'."\n"
                                .'   - json-start / json-delta / json-end'."\n"
                                .'   - 增量 delta-only JSON 流式协议'."\n"
                                .'   - 用于"动作表达"等结构化 JSON 模板输出分析结果', 'description' => '事件类型说明:'."\n"
                                ."\n"
                                .'1. 生命周期'."\n"
                                .'   - start / finish'."\n"
                                .'   - 标记消息的开始和结束'."\n"
                                ."\n"
                                .'2. 文本内容'."\n"
                                .'   - text-start / text-delta / text-end'."\n"
                                .'   - Markdown 文本流式输出'."\n"
                                ."\n"
                                .'3. 内联媒体'."\n"
                                .'   - data-image-info / data-video-info'."\n"
                                .'   - 图文混排/视频文字混排中的媒体卡片'."\n"
                                ."\n"
                                .'4. 信源引用'."\n"
                                .'   - data-reference'."\n"
                                .'   - 统一信源列表(web / document / image / video)'."\n"
                                ."\n"
                                .'5. 行内引用'."\n"
                                .'   - data-document-ref'."\n"
                                .'   - Perplexity 风格行内文档引用'."\n"
                                ."\n"
                                .'6. 模板视频'."\n"
                                .'   - data-template-video'."\n"
                                .'   - AV 模板化 agent 输出的视频卡片'."\n"
                                ."\n"
                                .'7. 模板分析'."\n"
                                .'   - data-video-info / data-template-info / data-template-video-content'."\n"
                                .'   - AV 模板化 agent 的分析结果数据'."\n"
                                .'   - "语音转录""视频纲要""视频转脚本"等表格型模板通过 data-template-video-content 一次性下发'."\n"
                                ."\n"
                                .'8. 流式 JSON'."\n"
                                .'   - json-start / json-delta / json-end'."\n"
                                .'   - 增量 delta-only JSON 流式协议'."\n"
                                .'   - 用于"动作表达"等结构化 JSON 模板输出分析结果', 'type' => 'string', 'example' => 'start'],
                            'data' => [
                                'title' => '协议数据',
                                'description' => '协议数据',
                                'type' => 'object',
                                'properties' => [
                                    'errorCode' => ['title' => '错误码说明:'."\n"
                                        ."\n"
                                        .'1. 400 - 参数错误 (INVALID_PARAM)'."\n"
                                        .'   - appId is required:appId 为空'."\n"
                                        .'   - message role must be user:消息角色不是 user'."\n"
                                        ."\n"
                                        .'2. 403 - 无权限 (FORBIDDEN)'."\n"
                                        .'   - no permission to access this app:请求账号与应用归属不一致'."\n"
                                        ."\n"
                                        .'3. 404 - 应用不存在 (APP_NOT_FOUND)'."\n"
                                        .'   - appId is invalid:appId 对应的应用配置不存在'."\n"
                                        ."\n"
                                        .'4. 500 - 系统错误 (SYSTEM_ERROR)'."\n"
                                        .'   - system error:意图识别等内部处理异常'."\n"
                                        .'   - <业务异常信息>:Invoker 层抛出的业务异常,错误码和消息由异常本身携带', 'description' => '见错误码列表', 'type' => 'string', 'example' => '400'],
                                    'errorText' => ['title' => '错误码说明:'."\n"
                                        ."\n"
                                        .'1. 400 - 参数错误 (INVALID_PARAM)'."\n"
                                        .'   - appId is required:appId 为空'."\n"
                                        .'   - message role must be user:消息角色不是 user'."\n"
                                        ."\n"
                                        .'2. 403 - 无权限 (FORBIDDEN)'."\n"
                                        .'   - no permission to access this app:请求账号与应用归属不一致'."\n"
                                        ."\n"
                                        .'3. 404 - 应用不存在 (APP_NOT_FOUND)'."\n"
                                        .'   - appId is invalid:appId 对应的应用配置不存在'."\n"
                                        ."\n"
                                        .'4. 500 - 系统错误 (SYSTEM_ERROR)'."\n"
                                        .'   - system error:意图识别等内部处理异常'."\n"
                                        .'   - <业务异常信息>:Invoker 层抛出的业务异常,错误码和消息由异常本身携带', 'description' => '见错误码列表', 'type' => 'string', 'example' => '参数错误'],
                                    'id' => ['title' => '唯一标识,如多段文本,使用不同的id,文本内一致', 'description' => '唯一标识,如多段文本,使用不同的id,文本内一致', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'],
                                    'retryable' => ['title' => '错误是否可重试,默认true', 'description' => '错误是否可重试,默认true', 'type' => 'boolean', 'example' => 'true'],
                                    'type' => ['title' => '同event', 'description' => '同event', 'type' => 'string', 'example' => 'v'],
                                    'data' => ['title' => '负责结构回复数据', 'description' => '负责结构回复数据', 'type' => 'string', 'example' => '{'."\n"
                                        .' "items": ['."\n"
                                        .' {'."\n"
                                        .' "title": "电脑产品评测",'."\n"
                                        .' "videoUrl": "https://video.example.com/review.mp4",'."\n"
                                        .' "coverUrl": "https://images.example",'."\n"
                                        .' "tags": ['."\n"
                                        .' "数码产品",'."\n"
                                        .' "评测",'."\n"
                                        .' "电脑",'."\n"
                                        .' "生产力"'."\n"
                                        .' ]'."\n"
                                        .' }'."\n"
                                        .' ]'."\n"
                                        .'}'],
                                    'delta' => ['title' => '增量文本输出', 'description' => '增量文本输出', 'type' => 'string', 'example' => '如果你想更快看到上身效果,这 3 条短视频会更直观。\\n\\n**第一条:完整通勤 look**\\n\\n3 套通勤到周末无缝切换的浅色运动鞋穿搭。'],
                                    'finishReason' => ['title' => '完成原因,当取值为stop时表示输出结束;错误时,输出为错误原因。', 'description' => '完成原因,当取值为stop时表示输出结束;错误时,输出为错误原因。', 'type' => 'string', 'example' => 'stop'],
                                    'requestId' => ['description' => '请求id', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'."\n"],
                                ],
                            ],
                            'id' => ['title' => '请求id,同requestId', 'description' => '请求id,同requestId', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'],
                        ],
                        'description' => '',
                    ],
                ],
            ],
            'staticInfo' => ['returnType' => 'synchronous'],
            'title' => 'AI问答引擎接口',
            'description' => '[CleverSee AI搜问平台](https://aisearch.aliyun.com/web-search)智能问答应用的流式接口,支持多模态输入(文本、图片、结构化数据)和流式输出(文本、图片、视频、信源等)。接口采用 SSE(Server-Sent Events)协议推送响应数据,每个数据流为一个 JSON 对象,输出时会通过 `type` 字段标记不同数据类型。'."\n"
                ."\n"
                .'### 接入说明:'."\n"
                ."\n"
                .'智能问答流式接口,支持多模态输入(文本、图片、结构化数据)和流式输出(文本、图片、视频、信源等)。接口采用 SSE(Server-Sent Events)协议推送响应数据,每个数据流为一个 JSON 对象,输出时会通过 `type` 字段标记不同数据类型。'."\n"
                ."\n"
                .'### 数据源:'."\n"
                ."\n"
                .'支持对视频进行问答,可通过[CleverSee AI 搜问平台](https://aisearch.aliyun.com/web-search)的产品界面内或通过[数据集数据新增/更新 API](https://help.aliyun.com/zh/document_detail/3038471.html?spm=a2c4g.11186623.help-menu-3037946.d_0_2_1_0.54ed1e97NGXVV1&scm=20140722.H_3038471._.OR_help-T_cn~zh-V_1)完成数据上传及更新。'."\n"
                ."\n"
                .'# 认证方式'."\n"
                ."\n"
                .'通过 阿里云 SDK 调用 CleverSee - 智能问答 服务,具体调用指南请参考:[AI问答引擎接口](https://api.aliyun.com/document/AiSearchEngine/2026-04-17/QaChat)',
            'requestParamsDescription' => '正常请求示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'### 图文问答请求'."\n"
                ."\n"
                .'```json'."\n"
                .'  {'."\n"
                .'    "id": "chat-002",'."\n"
                .'    "message": {'."\n"
                .'      "role": "user",'."\n"
                .'      "parts": ['."\n"
                .'        { "type": "text", "text": "找下类似这双鞋的款式" },'."\n"
                .'        {'."\n"
                .'          "type": "file",'."\n"
                .'          "url": "https://example.com/image.png",'."\n"
                .'          "mediaType": "image/png"'."\n"
                .'        }'."\n"
                .'      ]'."\n"
                .'    },'."\n"
                .'    "options": { "appId": "app_001" }'."\n"
                .'  }'."\n"
                .'```'."\n"
                ."\n"
                .'### 视频模板请求'."\n"
                ."\n"
                .'```json'."\n"
                .'{'."\n"
                .'  "id": "chat-002",'."\n"
                .'  "message": {'."\n"
                .'    "role": "user",'."\n"
                .'    "parts": ['."\n"
                .'      {'."\n"
                .'        "type": "text",'."\n"
                .'        "text": "总结这个视频"'."\n"
                .'      },'."\n"
                .'      {'."\n"
                .'        "type": "data",'."\n"
                .'        "data": {'."\n"
                .'          "type": "template",'."\n"
                .'          "videoId": "vid_001"'."\n"
                .'        }'."\n"
                .'      }'."\n"
                .'    ]'."\n"
                .'  },'."\n"
                .'  "options": {'."\n"
                .'    "appId": "app_001"'."\n"
                .'  }'."\n"
                .'}'."\n"
                .'```',
            'responseParamsDescription' => '响应以 SSE 流形式逐帧推送,每帧为一个 JSON 对象,必须包含 `type` 字段标识当前数据块类型。'."\n"
                ."\n"
                .'### 数据块类型总览'."\n"
                ."\n"
                .'| **类型分类**                 | **数据块类型**                                    | **说明**                       |'."\n"
                .'| ---------------------------------- | ------------------------------------------------------- | ------------------------------------ |'."\n"
                .'| 消息开始和结束                     | `start`、`finish`                                   | 标记消息的开始和结束                 |'."\n"
                .'| 文本流式回复                       | `text-start`、`text-delta`、`text-end`            | Markdown 文本流式输出               |'."\n"
                .'| ### 图文视频混排回复               | `data-image-info`、`data-video-ref`                 | 图文混排/视频文字混排中的媒体卡片    |'."\n"
                .'| ### 视频问答应用回复(模板输出型) | `data-template-info`、`data-template-video-content` | AV 模板化 agent 输出的视频卡片    |'."\n"
                .'| 回复信源引用                       | `data-reference`                                      | 统一信源列表(document/image/video) |'."\n"
                ."\n"
                .'### 消息开始和结束'."\n"
                ."\n"
                .'完整的消息生命周期遵循以下顺序:'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'start → 内容块(可多个,可交替) → finish'."\n"
                .'```'."\n"
                ."\n"
                .'步骤说明:'."\n"
                ."\n"
                .'1. `start`:消息开始,携带 `messageId`。'."\n"
                .'2. 内容块(`text-*`、`data-*` 等,可多个、可交替)。'."\n"
                .'3. `finish`:消息结束,携带 `finishReason`。'."\n"
                ."\n"
                .'#### 消息开始 `**start**`'."\n"
                ."\n"
                .'标记一条新的消息开始。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**   |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `start` |'."\n"
                .'| `messageId`    | string         | 是                 | 消息唯一标识     |'."\n"
                ."\n"
                .'#### 消息结束 `**finish**`'."\n"
                ."\n"
                .'标记消息结束,携带完成原因。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                                             |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------------------------------------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `finish`                                          |'."\n"
                .'| `finishReason` | string         | 是                 | 结束原因,例如 `stop`(正常结束)、`error`(异常结束) |'."\n"
                ."\n"
                .'### 文本流式回复'."\n"
                ."\n"
                .'文本内容输出采用流式分块输出,一个完整的文本段落由 `text-start` → 若干 `text-delta` → `text-end` 组成。多个文本块可与媒体块交替出现,实现图文混排或视频文字混排。'."\n"
                ."\n"
                .'1. `text-start`:标记文本块开始,携带该文本块的唯一 `id`。'."\n"
                .'2. `text-delta`:推送增量文本内容,同一 `id` 可多次出现,客户端按顺序拼接。'."\n"
                .'3. `text-end`:标记文本块结束。'."\n"
                ."\n"
                .'#### text-start'."\n"
                ."\n"
                .'标记一个文本块开始。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**        |'."\n"
                .'| ---------------- | -------------- | ------------------ | --------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `text-start` |'."\n"
                .'| `id`           | string         | 是                 | 文本块唯一标识        |'."\n"
                ."\n"
                .'#### text-delta'."\n"
                ."\n"
                .'文本增量内容,支持 Markdown 格式。同一文本块可多次推送 `text-delta`,客户端按顺序拼接。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**               |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `text-delta`        |'."\n"
                .'| `id`           | string         | 是                 | 所属文本块标识               |'."\n"
                .'| `delta`        | string         | 是                 | 本次增量 Markdown 文本内容 |'."\n"
                ."\n"
                .'#### text-end'."\n"
                ."\n"
                .'标记一个文本块结束。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**      |'."\n"
                .'| ---------------- | -------------- | ------------------ | ------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `text-end` |'."\n"
                .'| `id`           | string         | 是                 | 所属文本块标识      |'."\n"
                ."\n"
                .'### 图文视频混排回复'."\n"
                ."\n"
                .'文本块与媒体块可交替输出,形成混排效果。典型顺序为:'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'text-start → text-delta → text-end → data-image-info → text-start → text-delta → text-end → data-video-info → ...'."\n"
                .'```'."\n"
                ."\n"
                .'#### 图文混排问答回复 `data-image-info`'."\n"
                ."\n"
                .'说明:图文混排中的内联图片卡片,穿插在文本块之间。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**               |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------------------- |'."\n"
                .'| type             | String         | 是                 | 固定值 `"data-image-info"` |'."\n"
                .'| data             | Object         | 是                 | 图片数据对象                 |'."\n"
                .'| ├─ id         | String         | 是                 | 图片唯一 ID                 |'."\n"
                .'| ├─ imageUrl   | String         | 是                 | 图片 URL                    |'."\n"
                .'| └─ name       | String         | 是                 | 图片名称/标题                |'."\n"
                ."\n"
                .'#### 视频文本混排问答回复 `data-video-ref`'."\n"
                ."\n"
                .'说明:视频文字混排中的内联视频卡片,穿插在文本块之间。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**              |'."\n"
                .'| ---------------- | -------------- | ------------------ | --------------------------- |'."\n"
                .'| type             | String         | 是                 | 固定值 `"data-video-ref"` |'."\n"
                .'| data             | Object         | 是                 | 视频数据对象                |'."\n"
                .'| ├─ id         | String         | 是                 | 视频/片段唯一 ID           |'."\n"
                .'| ├─videoId      | String         | 是                 | 视频唯一 ID                |'."\n"
                .'| ├─videoType    | String         | 是                 | segment-片段,raw-视频      |'."\n"
                .'| ├─ videoUrl   | String         | 是                 | 视频/片段 URL              |'."\n"
                .'| ├─ name       | String         | 是                 | 视频名称/标题               |'."\n"
                .'| ├─fullVideoUrl | String         | 否                 | 完整视频URL                 |'."\n"
                .'| ├─start        | String         | 否                 | 片段开始时间                |'."\n"
                .'| ├─end          | String         | 否                 | 片段结束时间                |'."\n"
                .'| └─ coverUrl   | String         | 是                 | 视频封面图 URL             |'."\n"
                ."\n"
                .'### 视频问答应用(模板输出型)回复'."\n"
                ."\n"
                .'| **模板类型** | **模板名称**             | **输出格式**               |'."\n"
                .'| ------------------ | ------------------------------ | -------------------------------- |'."\n"
                .'| 平台模板           | 动作表达、赛事高光、知识要点   | 流式Json类                       |'."\n"
                .'|                    | 视频纲要、视频转脚本、语音转录 | 结构化Json输出                   |'."\n"
                .'|                    | 剧情理解、会议纪要             | MarkDown                         |'."\n"
                .'| 自定义模板         | 自定义模板                     | 默认Markdown输出,可按需调整配置 |'."\n"
                ."\n"
                .'#### 视频信息 `**data-video-info**`'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                   |'."\n"
                .'| ---------------- | -------------- | ------------------ | -------------------------------- |'."\n"
                .'| type             | String         | 是                 | 固定值 `"data-template-video"` |'."\n"
                .'| data             | Object         | 是                 | 视频信息数据对象                 |'."\n"
                .'| ├─ coverUrl   | string         | 是                 | 视频封面图片地址                 |'."\n"
                .'| ├─ keywords   | string         | 是                 | 视频关键词标签(逗号分隔)       |'."\n"
                .'| ├─ videoUrl   | string         | 是                 | 视频文件原始地址                 |'."\n"
                .'| ├─ sourceType | string         | 是                 | 内容来源类型(固定值"video")    |'."\n"
                .'| ├─ videoType  | string         | 是                 | 视频存储类型(raw表示原始视频)  |'."\n"
                .'| ├─ name       | string         | 是                 | 视频文件名称                     |'."\n"
                .'| └─ id         | string         | 是                 | 视频资源唯一标识(视频ID)       |'."\n"
                ."\n"
                .'#### 平台模板信息 `**data-template-info**`'."\n"
                ."\n"
                .'平台预指模板包含:'."\n"
                ."\n"
                .'| **参数名**   | **类型** | **是否必填** | **说明**                                                     |'."\n"
                .'| ------------------ | -------------- | ------------------ | ------------------------------------------------------------------ |'."\n"
                .'| type               | String         | 是                 | 固定值 `"data-template-info"`                                    |'."\n"
                .'| data               | Object         | 是                 | 数据对象                                                           |'."\n"
                .'| └─ templateName | string         | 是                 | 模板名称,例如"视频转脚本"                                         |'."\n"
                .'| └─ templateId   | string         | 是                 | 模板id,例如:`"tpl-3"`。如果是自定义模板,模板id为 `"custom"` |'."\n"
                ."\n"
                .'#### 自定义模板 `**data-template-video-content**`'."\n"
                ."\n"
                .'| **参数名** | **类型**  | **是否必填** | **说明**                                                                                                                   |'."\n"
                .'| ---------------- | --------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |'."\n"
                .'| type             | String          | 是                 | 固定值 `"data-template-video-content"`                                                                                         |'."\n"
                .'| data             | Object          | 是                 | 自定义结构数据对象                                                                                                               |'."\n"
                .'| ├─ header     | Object          | 是                 | 表头定义,`Record<string, string>` 类型,key 为列标识,value 为列显示名,例如 `{"content_summary": "内容概要"}`        |'."\n"
                .'| └─ list       | Array\\[Object\\] | 是                 | 具体内容,每行为开放式键值对(`[key: string]: string \\| number`),可按 `header` 动态渲染。不同模板会启用不同的字段子集 |'."\n"
                ."\n"
                .'常见list字段如下:'."\n"
                ."\n"
                .'| **参数名**    | **类型** | **是否必填** | **说明**                     |'."\n"
                .'| ------------------- | -------------- | ------------------ | ---------------------------------- |'."\n"
                .'| `start`           | number         | 否                 | 片段起始时间(秒)                 |'."\n"
                .'| `end`             | number         | 否                 | 片段结束时间(秒)                 |'."\n"
                .'| `title`           | string         | 否                 | 段落标题(视频纲要模板 `tpl-2`) |'."\n"
                .'| `summary`         | string         | 否                 | 段落摘要(视频纲要模板 `tpl-2`) |'."\n"
                .'| `content_summary` | string         | 否                 | 内容摘要(视频转脚本等模板)       |'."\n"
                .'| `transcription`   | string         | 否                 | 转录文本(语音转录模板)           |'."\n"
                .'| `director_prompt` | string         | 否                 | 导演提示词(视频转脚本模板)       |'."\n"
                .'| `shot_size`       | string         | 否                 | 景别:远 / 中 / 近 / 特写等  |'."\n"
                .'| `remarks`         | string         | 否                 | 备注                               |'."\n"
                ."\n"
                .'> 注:`header` 的 key 与 `list[ ]` 行中的 key 一一对应(例如「视频纲要」模板的 header 为 `{ start, end, title, summary }`)。具体字段由后端模板决定,上表仅列出常见字段。'."\n"
                ."\n"
                .'#### 流式 JSON 类'."\n"
                ."\n"
                .'模板化 agent 场景下,分析结果以 JSON 字符串的形式增量流式下发(delta-only 协议)。一段完整的 JSON 由 `json-start` → 若干 `json-delta` → `json-end` 三个独立事件组成,三个事件共享同一个 `id`;前端按出现顺序拼接各 `delta` 即可还原完整 JSON 字符串,再自行 `JSON.parse`。'."\n"
                ."\n"
                .'##### 输出开始 `**json-start**`'."\n"
                ."\n"
                .'标记一段流式 JSON 开始。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**        |'."\n"
                .'| ---------------- | -------------- | ------------------ | --------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `json-start` |'."\n"
                .'| `id`           | string         | 是                 | JSON 段唯一标识      |'."\n"
                ."\n"
                .'##### 输出增量 `**json-delta**`'."\n"
                ."\n"
                .'JSON 增量字符串片段,同一 `id` 可多次推送,客户端按顺序拼接。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**             |'."\n"
                .'| ---------------- | -------------- | ------------------ | -------------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `json-delta`      |'."\n"
                .'| `id`           | string         | 是                 | 所属 JSON 段标识         |'."\n"
                .'| `delta`        | string         | 是                 | 本次增量 JSON 字符串片段 |'."\n"
                ."\n"
                .'##### 输出结束 `**json-end**`'."\n"
                ."\n"
                .'标记一段流式 JSON 结束。此时前端应将累积字符串作为完整 JSON 进行解析。'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**      |'."\n"
                .'| ---------------- | -------------- | ------------------ | ------------------- |'."\n"
                .'| `type`         | string         | 是                 | 固定值 `json-end` |'."\n"
                .'| `id`           | string         | 是                 | 所属 JSON 段标识  |'."\n"
                ."\n"
                .'> 注:`id`、`type` 字段均直接平铺在事件顶层(与 `text-*` 协议一致),**不** 嵌套在 `data` 字段中。'."\n"
                ."\n"
                .'##### 视频模板适用性评估 JSON 结构'."\n"
                ."\n"
                .'在问答-模板化输出 agent 场景下,若当前视频画不适用该模板 `json-*` 流拼接出的完整 JSON 为对应模板的结构化分析结果。JSON 的最外层 schema 由命中的 `templateId` 决定(参见前文 `data-template-info`),常见结构示例如下:'."\n"
                ."\n"
                .'**通用字段:**'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                                             |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------------------------------------------------- |'."\n"
                .'| `applicable`   | boolean        | 是                 | 当前视频是否适用于该模板;为 `false` 时其余业务字段可空 |'."\n"
                .'| `content_type` | string         | 否                 | 模板判定出的内容大类,例如 `"电影/电视剧表演段落"`       |'."\n"
                ."\n"
                .'**示例:「动作表达」模板(**`**templateId = tpl-8**`**)**'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**               |'."\n"
                .'| ---------------- | -------------- | ------------------ | ---------------------------- |'."\n"
                .'| `actions`      | array          | 是                 | 按时间顺序排列的动作片段数组 |'."\n"
                ."\n"
                .'`**actions[ ]**` **元素:**'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                                         |'."\n"
                .'| ---------------- | -------------- | ------------------ | ------------------------------------------------------ |'."\n"
                .'| `start`        | number         | 是                 | 片段起始时间(秒)                                     |'."\n"
                .'| `end`          | number         | 是                 | 片段结束时间(秒)                                     |'."\n"
                .'| `subject`      | string         | 是                 | 动作主体,例如 `"警官"`、`"老妇人"`                |'."\n"
                .'| `action`       | string         | 是                 | 动作描述(肢体/表情/行为)                             |'."\n"
                .'| `intensity`    | string         | 是                 | 动作/情绪强度,例如 `"强硬、严肃"`、`"绝望、恐惧"` |'."\n"
                .'| `context`      | string         | 是                 | 场景语境与镜头/情感说明                                |'."\n"
                ."\n"
                .'> 注:不同模板会对应不同的 JSON schema(如「知识要点」「会议纪要」等会使用其他字段)。上表仅示例「动作表达」模板。可根据 `data-template-info.templateId` 动态选择解析结构。'."\n"
                ."\n"
                .'### 回复信源引用'."\n"
                ."\n"
                .'### `data-reference`'."\n"
                ."\n"
                .'| **参数名** | **类型**  | **是否必填** | **说明**              |'."\n"
                .'| ---------------- | --------------- | ------------------ | --------------------------- |'."\n"
                .'| type             | String          | 是                 | 固定值 `"data-reference"` |'."\n"
                .'| data             | Object          | 是                 | 数据对象                    |'."\n"
                .'| └─ items      | Array\\[Object\\] | 是                 | 信源项数组(见下方子类型)  |'."\n"
                ."\n"
                .'> ️ `items[]` 中每个元素根据 `sourceType` 不同,结构如下:'."\n"
                ."\n"
                .'---'."\n"
                ."\n"
                .'### 当引用对象为文档时 `sourceType = "document"`'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                    |'."\n"
                .'| ---------------- | -------------- | ------------------ | --------------------------------- |'."\n"
                .'| sourceType       | String         | 是                 | 固定值 `"document"`             |'."\n"
                .'| fileName         | String         | 是                 | 来源文件名称                      |'."\n"
                .'| fileType         | String         | 是                 | 文件格式(pdf/docx/txt/md/url等) |'."\n"
                .'| chunkContent     | String         | 是                 | 检索片段内容                      |'."\n"
                .'| score            | Number         | 是                 | 检索得分                          |'."\n"
                ."\n"
                .'---'."\n"
                ."\n"
                .'### 当引用对象为图片时 `sourceType = "image"` '."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**     |'."\n"
                .'| ---------------- | -------------- | ------------------ | ------------------ |'."\n"
                .'| sourceType       | String         | 是                 | 固定值 `"image"` |'."\n"
                .'| datasetName      | String         | 是                 | 来源图片数据集名称 |'."\n"
                .'| thumbnailUrl     | String         | 是                 | 缩略图 URL        |'."\n"
                .'| imageUrl         | String         | 是                 | 图片原始 URL      |'."\n"
                ."\n"
                .'---'."\n"
                ."\n"
                .'### 当引用对象为视频片段时 `sourceType = "video"`'."\n"
                ."\n"
                .'| **参数名** | **类型** | **是否必填** | **说明**                    |'."\n"
                .'| ---------------- | -------------- | ------------------ | --------------------------------- |'."\n"
                .'| sourceType       | String         | 是                 | 固定值 `"video"`                |'."\n"
                .'| videoSource      | String         | 是                 | Video source 名称               |'."\n"
                .'| videoUrl         | String         | 是                 | 视频 URL                         |'."\n"
                .'| clipTimeRange    | String         | 是                 | 片段时间范围(如 "01:23-02:45") |'."\n"
                ."\n"
                .'## 返回示例'."\n"
                ."\n"
                .'### 正常返回示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'#### 图片问答响应'."\n"
                ."\n"
                .'以下为图片问答应用内流式输出,且图片文本混排的示例'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'  data: {"type":"start","messageId":"msg-001"}'."\n"
                ."\n"
                .'  data: {"type":"text-start","id":"text-1"}'."\n"
                ."\n"
                .'  data: {"type":"text-delta","id":"text-1","delta":"按风格选:轻运动 VS 日常休闲\\n\\n"}'."\n"
                ."\n"
                .'  data: {"type":"text-delta","id":"text-1","delta":"**轻运动款** —— 活力感与舒适感兼顾"}'."\n"
                ."\n"
                .'  data: {"type":"text-end","id":"text-1"}'."\n"
                .'  '."\n"
                .'  data: {"type":"data-image-info","data":{"id":"img-001","imageUrl":"https://cdn.example.com/i1.jpg","name":"轻运动款 - 拼接运动鞋"}}'."\n"
                ."\n"
                .'  data: {"type":"text-start","id":"text-2"}'."\n"
                .'  '."\n"
                .'  data: {"type":"text-delta","id":"text-2","delta":"**日常休闲款** —— 简洁耐看更百搭"}'."\n"
                ."\n"
                .'  data: {"type":"text-end","id":"text-2"}'."\n"
                ."\n"
                .'  data: {"type":"data-image-info","data":{"id":"img-002","imageUrl":"https://cdn.example.com/i2.jpg","name":"日常休闲款 - 纯色休闲鞋"}}'."\n"
                ."\n"
                .'  data: {"type":"data-reference","data":{"items":['."\n"
                .'    {"sourceType":"document","fileName":"运动鞋舒适度评测报告.docx","fileType":"docx","chunkContent":"在中端价位段中,轻量透气材质逐渐成为主流...","score":0.87},'."\n"
                .'    {"sourceType":"image","datasetName":"商品图片数据集","thumbnailUrl":"https://cdn.example.com/i2-thumb.jpg","imageUrl":"https://cdn.example.com/i2.jpg"}'."\n"
                .'  ]}}'."\n"
                ."\n"
                .'  data: {"type":"finish","finishReason":"stop"}'."\n"
                .'```'."\n"
                ."\n"
                .'#### 视频问答响应(视频文字混排)'."\n"
                ."\n"
                .'以下为视频问答应用(对话型)内流式输出,且视频文本混排的示例'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'data:{"id":"mock-session-001","type":"start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"视频中"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"展示了"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"悬挂"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"的"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"装饰"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"摆件"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":",并通过"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"特写"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"镜头"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"展示"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"其"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"纹理"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-delta","requestId":"mock-request-001","delta":"细节"}'."\n"
                ."\n"
                .'data:{"id":"text-block-001","type":"text-end","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"video-ref-001","type":"data-video-ref","requestId":"mock-request-001","data":{"coverUrl":"https://.../cover_frame.jpg?Expires=...","videoUrl":"https://.../demo_video.mp4?Expires=...","sourceType":"video","name":"sample_video.mp4","start":"0.00","datasetId":"DATASET_001","end":"10.00","id":"video-001"}}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"。为了"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"展示"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"使用"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"效果"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":",画面"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"演示了"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"该"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"摆件"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"在"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"室内"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"与"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"桌面"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"场景"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"中的"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-delta","requestId":"mock-request-001","delta":"摆放"}'."\n"
                ."\n"
                .'data:{"id":"text-block-002","type":"text-end","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"video-ref-002","type":"data-video-ref","requestId":"mock-request-001","data":{"coverUrl":"https://.../cover_frame_02.jpg?Expires=...","videoUrl":"https://.../demo_video.mp4?Expires=...","sourceType":"video","name":"sample_video.mp4","start":"10.00","datasetId":"DATASET_001","end":"20.00","id":"video-001"}}'."\n"
                ."\n"
                .'data:{"id":"text-block-003","type":"text-start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"text-block-003","type":"text-delta","requestId":"mock-request-001","delta":"。"}'."\n"
                ."\n"
                .'data:{"id":"text-block-003","type":"text-end","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'data:{"id":"reference-001","type":"data-reference","requestId":"mock-request-001","data":{"items":[{"coverUrl":"https://.../cover_frame.jpg?Expires=...","videoUrl":"https://.../demo_video.mp4?Expires=...","sourceType":"video","name":"sample_video.mp4","start":"10.00","datasetId":"DATASET_001","end":"20.00","id":"video-001"}]}}'."\n"
                ."\n"
                .'data:{"id":"mock-session-001","type":"finish","requestId":"mock-request-001","finishReason":"stop"}'."\n"
                .'```'."\n"
                ."\n"
                .'#### 视频模板响应'."\n"
                ."\n"
                .'以下为问答应用(模板输出型)内不同类型模板的输出示例'."\n"
                ."\n"
                .'##### 流式Json类(动作表达、赛事高光、知识要点)'."\n"
                ."\n"
                .'```markdown'."\n"
                .'id:mock-msg-default-001'."\n"
                .'event:start'."\n"
                .'data:{"id":"mock-msg-default-001","type":"start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'id:mock-video-info-001'."\n"
                .'event:data-video-info'."\n"
                .'data:{"id":"mock-video-info-001","type":"data-video-info","requestId":"mock-request-001","data":{"coverUrl":"https://example.com/mock/cover.jpg","keywords":"团队协作,产品演示,用户体验,功能亮点","videoUrl":"https://example.com/mock/video.mp4","sourceType":"video","videoType":"raw","name":"demo-video.mp4","id":"mock-video-id-001"}}'."\n"
                ."\n"
                .'id:mock-template-info-001'."\n"
                .'event:data-template-info'."\n"
                .'data:{"id":"mock-template-info-001","type":"data-template-info","requestId":"mock-request-001","data":{"templateName":"动作表达","templateId":"tpl-demo-001"}}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-start'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"{"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n  \\"applicable\\": true,"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n  \\"content_type\\": \\"产品演示片段\\","}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n  \\"actions\\": ["}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n    {"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"start\\": 0.0,"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"end\\": 10.0,"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"subject\\": \\"演示人员\\","}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"action\\": \\"走向展示区并介绍核心功能\\","}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"intensity\\": \\"自然、清晰\\","}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n      \\"context\\": \\"通过稳定讲解帮助观众理解产品亮点\\""}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n    }"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n  ]"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-delta'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-delta","requestId":"mock-request-001","delta":"\\n}"}'."\n"
                ."\n"
                .'id:mock-json-stream-001'."\n"
                .'event:json-end'."\n"
                .'data:{"id":"mock-json-stream-001","type":"json-end","requestId":"mock-request-001"}'."\n"
                .'```'."\n"
                ."\n"
                .'##### 结构化Json输出(视频纲要、视频转脚本、语音转录)'."\n"
                ."\n"
                .'```markdown'."\n"
                .'id:mock-start-001'."\n"
                .'event:start'."\n"
                .'data:{"id":"mock-start-001","type":"start","requestId":"mock-request-001"}'."\n"
                ."\n"
                .'id:video-info-001'."\n"
                .'event:data-video-info'."\n"
                .'data:{"id":"video-info-001","type":"data-video-info","requestId":"mock-request-001","data":{"coverUrl":"https://.../cover_frame.jpg?Expires=...","keywords":"人物交流,活动现场,生活分享,轻松互动","videoUrl":"https://.../sample_video.mp4?Expires=...","sourceType":"video","videoType":"raw","name":"sample_video.mp4","id":"VIDEO_ID_001"}}'."\n"
                ."\n"
                .'id:template-info-001'."\n"
                .'event:data-template-info'."\n"
                .'data:{"id":"template-info-001","type":"data-template-info","requestId":"mock-request-001","data":{"templateName":"视频转脚本","templateId":"tpl-demo-001"}}'."\n"
                ."\n"
                .'id:template-content-001'."\n"
                .'event:data-template-video-content'."\n"
                .'data:{"id":"template-content-001","type":"data-template-video-content","requestId":"mock-request-001","data":{"header":{"shot_size":"景别","director_prompt":"导演提示","content_summary":"内容概要","transcription":"转录","remarks":"备注","start":"开始时间","end":"结束时间"},"list":['."\n"
                ."\n"
                .'  {"content_summary":"几位年轻人在户外活动现场边走边交流。","transcription":"男声介绍活动安排,语气轻松自然,背景伴有现场环境声。","director_prompt":"跟随人物移动后切换正面镜头","shot_size":"中景","start":0.0,"end":10.0,"remarks":"场景光线自然,周围人群氛围轻松愉快。"},'."\n"
                ."\n"
                .'  {"content_summary":"主持人在室内活动现场向观众介绍流程。","transcription":"男声说明接下来的互动环节,语气平稳且具有节奏感。","director_prompt":"缓慢推进","shot_size":"中景","start":10.0,"end":20.0,"remarks":"画面色调温暖,观众神情专注,现场布置整洁明亮。"},'."\n"
                ."\n"
                .'  {"content_summary":"一位长者在室内与年轻人进行交流。","transcription":"长者语气温和,分享自己的生活经验与建议。","director_prompt":"缓慢推进","shot_size":"中景","start":20.0,"end":30.0,"remarks":"场景色调偏暖,人物互动自然。"},'."\n"
                ."\n"
                .']}}'."\n"
                ."\n"
                .'id:mock-start-001'."\n"
                .'event:finish'."\n"
                .'data:{"id":"mock-start-001","type":"finish","requestId":"mock-request-001","finishReason":"stop"}'."\n"
                .'```'."\n"
                ."\n"
                .'##### Markdown格式(剧情理解、会议纪要、自定义模板)'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'data: {"type":"start","messageId":"mock-msg-default-001"}'."\n"
                ."\n"
                .'data: {"type":"start-step"}'."\n"
                ."\n"
                .'data: {"type":"data-template-info","data":{"items":[{"title":"MacBook Neo 深度测评:全面超越,最轻盈的生产力","videoUrl":"https://video.example.com/macbook-neo-review.mp4","coverUrl":"https://images.unsplash.com/photo-1529139574466-a303027c1d8b?auto=format&fit=crop&w=800&q=80","tags":["数码产品","评测","MacBook","生产力"]}]}}'."\n"
                ."\n"
                .'data: {"id":"b43b71c8-dcf0-4597-b1e8-3b7b7599f73e","type":"data-template-info","requestId":"1e78148a17782391368705400d119a","data":{"templateName":"视频转脚本","templateId":"tpl-3"}}'."\n"
                ."\n"
                .'data: {"type":"text-start","id":"text-video-summary-001"}'."\n"
                ."\n"
                .'data: {"type":"text-delta","id":"text-video-summary-001","delta":"## 视频内容总结\\n\\n### 1. MacBook Neo 深度测评\\n\\n- **核心亮点**:全新 M4 Ultra 芯片,单核性能提升 32%,整机重量仅 1.24kg\\n- **续航表现**:视频播放续航达 22 小时,日常办公可撑满两个工作日\\n- **不足之处**:接口仍为 3 个 USB-C,缺少 SD 卡槽\\n\\n> 适合人群:追求轻薄便携的创意工作者"}'."\n"
                ."\n"
                .'data: {"type":"text-end","id":"text-video-summary-001"}'."\n"
                ."\n"
                .'data: {"type":"finish-step"}'."\n"
                ."\n"
                .'data: {"type":"finish","finishReason":"stop"}'."\n"
                ."\n"
                .'```'."\n"
                ."\n"
                .'### 拒答返回示例'."\n"
                ."\n"
                .'`JSON`格式'."\n"
                ."\n"
                .'```plaintext'."\n"
                .'data: {"type":"start","messageId":"mock-msg-default-001"}'."\n"
                ."\n"
                .'data: {"type":"text-start","id":"text-default-part1"}'."\n"
                ."\n"
                .'data: {"type":"text-delta","id":"text-default-part1","delta":"抱歉,这个话题超出了我的回答范围,有其他问题请随时问我。"}'."\n"
                ."\n"
                .'data: {"type":"text-end","id":"text-default-part1"}'."\n"
                ."\n"
                .'data: {"type":"finish","finishReason":"stop"}'."\n"
                .'```'."\n"
                ."\n"
                .'## 错误码'."\n"
                ."\n"
                .'| **HTTP状态码** | **错误码**         | **错误message**                     | **说明**                                 |'."\n"
                .'| -------------------- | ------------------------ | ----------------------------------------- | ---------------------------------------------- |'."\n"
                .'| 401                  | `APP_ID_REQUIRED`      | `appId is required`                   | 缺少应用 ID                                   |'."\n"
                .'| 402                  | `INVALID_ROLE`         | `message role must be user`         | 消息角色无效                                   |'."\n"
                .'| 403                  | `APP_NOT_FOUND`        | `app not found`                       | 应用不存在                                     |'."\n"
                .'| 404                  | `INPUT_TOO_LONG`       | `input text exceeds maximum length` | 文本输入内容太长,超出最大长度(1024字符)限制 |'."\n"
                .'| 405                  | `IMAGE_LIMIT_EXCEEDED` | `image count exceeds maximum limit` | 上传图片数量超过5张上限                        |'."\n"
                .'| 500                  | `SYSTEM_ERROR`         | `system error`                         | 系统错误                                       |'."\n"
                .'| 700                  | `FORBIDDEN`            | `no permission to access this app` | 没有权限访问该应用                             |'."\n"
                ."\n"
                .'# 搜索结果中多媒体资源(图片、视频)URL获取预签名 API'."\n"
                ."\n"
                .'如需获取数据集内数据url链接并进行下载,请参考[搜索结果中多媒体资源(图片、视频)URL获取预签名 API](https://help.aliyun.com/zh/document_detail/3039566.html?spm=a2c4g.11186623.help-menu-3037946.d_0_2_1_1.2d961e97iV5opr&scm=20140722.H_3039566._.OR_help-T_cn~zh-V_1)',
            'changeSet' => [],
            'ramActions' => [
                [
                    'operationType' => 'create',
                    'ramAction' => [
                        'action' => 'aisearchengine:QaChat',
                        'authLevel' => 'operate',
                        'actionConditions' => [],
                        'resources' => [
                            ['validationType' => 'always', 'product' => 'AiSearchEngine', 'resourceType' => '全部资源', 'arn' => '*'],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"event\\": \\"start\\",\\n  \\"data\\": {\\n    \\"errorCode\\": \\"400\\",\\n    \\"errorText\\": \\"参数错误\\",\\n    \\"id\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\",\\n    \\"retryable\\": true,\\n    \\"type\\": \\"v\\",\\n    \\"data\\": \\"{\\\\n \\\\\\"items\\\\\\": [\\\\n {\\\\n \\\\\\"title\\\\\\": \\\\\\"电脑产品评测\\\\\\",\\\\n \\\\\\"videoUrl\\\\\\": \\\\\\"https://video.example.com/review.mp4\\\\\\",\\\\n \\\\\\"coverUrl\\\\\\": \\\\\\"https://images.example\\\\\\",\\\\n \\\\\\"tags\\\\\\": [\\\\n \\\\\\"数码产品\\\\\\",\\\\n \\\\\\"评测\\\\\\",\\\\n \\\\\\"电脑\\\\\\",\\\\n \\\\\\"生产力\\\\\\"\\\\n ]\\\\n }\\\\n ]\\\\n}\\",\\n    \\"delta\\": \\"如果你想更快看到上身效果,这 3 条短视频会更直观。\\\\\\\\n\\\\\\\\n**第一条:完整通勤 look**\\\\\\\\n\\\\\\\\n3 套通勤到周末无缝切换的浅色运动鞋穿搭。\\",\\n    \\"finishReason\\": \\"stop\\",\\n    \\"requestId\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\\\n\\"\\n  },\\n  \\"id\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\"\\n}","type":"json"}]',
        ],
    ],
    'endpoints' => [
        ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'aisearchengine.aliyuncs.com', 'endpoint' => 'aisearchengine.aliyuncs.com', 'vpc' => ''],
    ],
    'errorCodes' => [],
    'changeSet' => [],
    'ram' => [
        'productCode' => 'AiSearchEngine',
        'productName' => 'AI搜推问引擎',
        'ramCodes' => ['aisearchengine'],
        'ramLevel' => '操作级',
        'ramConditions' => [],
        'ramActions' => [
            [
                'apiName' => 'QaChat',
                'description' => 'AI问答引擎接口',
                'operationType' => 'create',
                'ramAction' => [
                    'action' => 'aisearchengine:QaChat',
                    'authLevel' => 'operate',
                    'actionConditions' => [],
                    'resources' => [
                        ['validationType' => 'always', 'product' => 'AiSearchEngine', 'resourceType' => '全部资源', 'arn' => '*'],
                    ],
                ],
            ],
            [
                'apiName' => 'EngineSearch',
                'description' => 'AI搜索引擎接口',
                'operationType' => 'create',
                'ramAction' => [
                    'action' => 'aisearchengine:EngineSearch',
                    'authLevel' => 'operate',
                    'actionConditions' => [],
                    'resources' => [
                        ['validationType' => 'always', 'product' => 'AiSearchEngine', 'resourceType' => '全部资源', 'arn' => '*'],
                    ],
                ],
            ],
        ],
        'resourceTypes' => [],
    ],
];