summaryrefslogtreecommitdiff
path: root/data/zh_cn/multimodaldialog/2025-09-03/api-docs.php
blob: a26548b3c7c655845fe29f24707a973dc92254b8 (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
<?php return [
    'version' => '1.0',
    'info' => ['style' => 'ROA', 'product' => 'MultimodalDialog', 'version' => '2025-09-03'],
    'directories' => ['Vocabulary'],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'Vocabulary' => [
            'summary' => '提供热词词表的创建、删除、更新、查询功能。',
            'path' => '/openapi/vocabulary/v1',
            'methods' => ['post'],
            'schemes' => ['https'],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'consumes' => ['application/json'],
            'produces' => ['application/json'],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'free',
                'abilityTreeNodes' => ['FEATUREnlsPWZ9VY'],
                'autoTest' => false,
                'notSupportAutoTestReason' => '暂不支持',
                'tenantRelevance' => 'tenant',
            ],
            'parameters' => [
                [
                    'name' => 'body',
                    'in' => 'body',
                    'style' => 'json',
                    'schema' => [
                        'description' => '请求Body。',
                        'type' => 'object',
                        'properties' => [
                            'action' => [
                                'description' => '本次请求的操作。',
                                'type' => 'string',
                                'required' => false,
                                'enumValueTitles' => ['createVocabulary' => 'createVocabulary', 'queryVocabulary' => 'queryVocabulary', 'updateVocabulary' => 'updateVocabulary', 'deleteVocabulary' => 'deleteVocabulary'],
                                'example' => 'createVocabulary',
                            ],
                            'vocabularyName' => ['description' => '热词表名称。创建时必填。', 'type' => 'string', 'required' => false, 'example' => '热词表'],
                            'vocabulary' => [
                                'description' => '热词表,创建时必填。每个热词列表最多添加500个词。',
                                'type' => 'array',
                                'items' => [
                                    'description' => '热词。',
                                    'type' => 'object',
                                    'properties' => [
                                        'text' => ['description' => '热词文本。每个热词不超过15个汉字或7个英文单词。若热词同时含中文和英文,则汉字与英文字母总数不超过15个。', 'type' => 'string', 'required' => false, 'example' => '张三'],
                                        'lang' => [
                                            'description' => '热词语种。'."\n"
                                                .'- zh:中文'."\n"
                                                .'- en:英语',
                                            'type' => 'string',
                                            'required' => false,
                                            'enumValueTitles' => ['en' => 'en', 'zh' => 'zh'],
                                            'example' => 'zh',
                                        ],
                                        'type' => [
                                            'description' => '热词种类。如果需要在对话系统中使用联系人等类型的热词,需要设置该值。否则,如果只需要在asr任务中使用,可以将该值置为null或空字符串。'."\n"
                                                .'- contact_name:联系人',
                                            'type' => 'string',
                                            'required' => false,
                                            'enumValueTitles' => ['contact_name' => 'contact_name'],
                                            'example' => 'contact_name',
                                        ],
                                    ],
                                    'required' => false,
                                ],
                                'required' => false,
                            ],
                            'vocabularyId' => ['description' => '热词id。更新、删除时必填。', 'type' => 'string', 'required' => false, 'example' => 'a93b91141c0f422fa114af203f8b****'."\n"],
                            'vocabularyIds' => [
                                'description' => '热词id列表。查询时必填。',
                                'type' => 'array',
                                'items' => ['description' => '热词id。', 'type' => 'string', 'required' => false, 'example' => 'a93b91141c0f422fa114af203f8b****'],
                                'required' => false,
                            ],
                        ],
                        'required' => false,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => '响应参数',
                        'type' => 'object',
                        'properties' => [
                            'requestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '35124E1C-AE99-5D6C-A52E-BD689D8D****'."\n"],
                            'code' => ['description' => '状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'],
                            'message' => ['description' => '响应信息。', 'type' => 'string', 'example' => 'Success'],
                            'vocabularyId' => ['description' => '热词id。创建操作生成的热词唯一标识,在对话连接时可以传入此id。', 'type' => 'string', 'example' => 'a93b91141c0f422fa114af203f8b****'."\n"],
                            'vocabularys' => [
                                'description' => '热词列表。请求为查询操作时,根据热词id列表查询操作到的热词列表。',
                                'type' => 'array',
                                'items' => [
                                    'description' => '热词。',
                                    'type' => 'object',
                                    'properties' => [
                                        'vocabularyId' => ['description' => '热词id。', 'type' => 'string', 'example' => 'a93b91141c0f422fa114af203f8b****'."\n"],
                                        'vocabularyName' => ['description' => '热词表名称。查询不到对应热词时,该返回值为null。', 'type' => 'string', 'example' => '热词表'],
                                        'modifiedTime' => ['description' => '热词表最新修改时间。查询不到对应热词时,该返回值为null。', 'type' => 'integer', 'format' => 'int64', 'example' => '1749565022301'],
                                        'vocabulary' => [
                                            'description' => '热词。热词表最新修改时间。查询不到对应热词时,该返回值为null。',
                                            'type' => 'object',
                                            'properties' => [
                                                'text' => ['description' => '热词文本。', 'type' => 'string', 'example' => '张三'],
                                                'lang' => ['description' => '热词语种。', 'type' => 'string', 'example' => 'zh'],
                                                'type' => ['description' => '热词类型。', 'type' => 'string', 'example' => 'contact_name'],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'staticInfo' => ['returnType' => 'synchronous'],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"requestId\\": \\"35124E1C-AE99-5D6C-A52E-BD689D8D****\\\\n\\",\\n  \\"code\\": 200,\\n  \\"message\\": \\"Success\\",\\n  \\"vocabularyId\\": \\"a93b91141c0f422fa114af203f8b****\\\\n\\",\\n  \\"vocabularys\\": [\\n    {\\n      \\"vocabularyId\\": \\"a93b91141c0f422fa114af203f8b****\\\\n\\",\\n      \\"vocabularyName\\": \\"热词表\\",\\n      \\"modifiedTime\\": 1749565022301,\\n      \\"vocabulary\\": {\\n        \\"text\\": \\"张三\\",\\n        \\"lang\\": \\"zh\\",\\n        \\"type\\": \\"contact_name\\"\\n      }\\n    }\\n  ]\\n}","type":"json"}]',
            'title' => '热词管理',
            'responseParamsDescription' => '请求成功时,返回状态码为200。\\'."\n"
                .'如果返回状态码不是200,说明请求失败,可从message字段查看错误信息。以下为常见的错误响应信息:'."\n"
                .'+ Vocabulary not found error (指定热词id不存在,或不属于本阿里云账号)'."\n"
                .'+ Vocabulary size too large (热词表中热词数量超出限制)'."\n"
                .'+ Vocabulary format invalid (热词格式错误,如热词长度过大)'."\n"
                .'+ Internal vocabulary error (其他类型的热词错误)',
            'changeSet' => [],
            'flowControl' => [
                'flowControlList' => [],
            ],
            'ramActions' => [
                [
                    'operationType' => 'none',
                    'ramAction' => [
                        'action' => 'multimodaldialog:Vocabulary',
                        'authLevel' => 'operate',
                        'actionConditions' => [],
                        'resources' => [
                            ['validationType' => 'always', 'product' => 'MultimodalDialog', 'resourceType' => '全部资源', 'arn' => '*'],
                        ],
                    ],
                ],
            ],
        ],
    ],
    'endpoints' => [
        ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'multimodaldialog.cn-beijing.aliyuncs.com', 'endpoint' => 'multimodaldialog.cn-beijing.aliyuncs.com', 'vpc' => 'multimodaldialog-vpc.cn-beijing.aliyuncs.com'],
    ],
    'errorCodes' => [],
    'changeSet' => [],
    'flowControl' => [
        'flowControlList' => [],
    ],
    'ram' => [
        'productCode' => 'MultimodalDialog',
        'productName' => '智能语音交互',
        'ramCodes' => ['multimodaldialog'],
        'ramLevel' => '操作级',
        'ramConditions' => [],
        'ramActions' => [
            [
                'apiName' => 'Vocabulary',
                'description' => '热词管理',
                'operationType' => 'none',
                'ramAction' => [
                    'action' => 'multimodaldialog:Vocabulary',
                    'authLevel' => 'operate',
                    'actionConditions' => [],
                    'resources' => [
                        ['validationType' => 'always', 'product' => 'MultimodalDialog', 'resourceType' => '全部资源', 'arn' => '*'],
                    ],
                ],
            ],
        ],
        'resourceTypes' => [],
    ],
];