@alicloud/dianjin20240628 1.9.2 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +170 -0
- package/dist/client.js +208 -5
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +313 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -104,6 +104,73 @@ export class CreateDialogResponseBodyData extends $dara.Model {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
export class CreateDialogAnalysisTaskRequestConversationListDialogueList extends $dara.Model {
|
|
108
|
+
/**
|
|
109
|
+
* @remarks
|
|
110
|
+
* This parameter is required.
|
|
111
|
+
*/
|
|
112
|
+
content?: string;
|
|
113
|
+
/**
|
|
114
|
+
* @remarks
|
|
115
|
+
* This parameter is required.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* 1
|
|
119
|
+
*/
|
|
120
|
+
role?: string;
|
|
121
|
+
static names(): { [key: string]: string } {
|
|
122
|
+
return {
|
|
123
|
+
content: 'content',
|
|
124
|
+
role: 'role',
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static types(): { [key: string]: any } {
|
|
129
|
+
return {
|
|
130
|
+
content: 'string',
|
|
131
|
+
role: 'string',
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
validate() {
|
|
136
|
+
super.validate();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
constructor(map?: { [key: string]: any }) {
|
|
140
|
+
super(map);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export class CreateDialogAnalysisTaskRequestConversationList extends $dara.Model {
|
|
145
|
+
/**
|
|
146
|
+
* @remarks
|
|
147
|
+
* This parameter is required.
|
|
148
|
+
*/
|
|
149
|
+
dialogueList?: CreateDialogAnalysisTaskRequestConversationListDialogueList[];
|
|
150
|
+
static names(): { [key: string]: string } {
|
|
151
|
+
return {
|
|
152
|
+
dialogueList: 'dialogueList',
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
static types(): { [key: string]: any } {
|
|
157
|
+
return {
|
|
158
|
+
dialogueList: { 'type': 'array', 'itemType': CreateDialogAnalysisTaskRequestConversationListDialogueList },
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
validate() {
|
|
163
|
+
if(Array.isArray(this.dialogueList)) {
|
|
164
|
+
$dara.Model.validateArray(this.dialogueList);
|
|
165
|
+
}
|
|
166
|
+
super.validate();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
constructor(map?: { [key: string]: any }) {
|
|
170
|
+
super(map);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
107
174
|
export class CreateDocsSummaryTaskRequestDocInfos extends $dara.Model {
|
|
108
175
|
/**
|
|
109
176
|
* @remarks
|
|
@@ -6531,6 +6598,186 @@ export class CreateDialogResponse extends $dara.Model {
|
|
|
6531
6598
|
}
|
|
6532
6599
|
}
|
|
6533
6600
|
|
|
6601
|
+
export class CreateDialogAnalysisTaskRequest extends $dara.Model {
|
|
6602
|
+
analysisNodes?: string[];
|
|
6603
|
+
/**
|
|
6604
|
+
* @remarks
|
|
6605
|
+
* This parameter is required.
|
|
6606
|
+
*/
|
|
6607
|
+
conversationList?: CreateDialogAnalysisTaskRequestConversationList[];
|
|
6608
|
+
/**
|
|
6609
|
+
* @example
|
|
6610
|
+
* {
|
|
6611
|
+
* "labels": "XXX",
|
|
6612
|
+
* "summaryConstraints": "XXX",
|
|
6613
|
+
* "sopInfo": "XXX"
|
|
6614
|
+
* }
|
|
6615
|
+
*/
|
|
6616
|
+
metaData?: { [key: string]: any };
|
|
6617
|
+
/**
|
|
6618
|
+
* @remarks
|
|
6619
|
+
* This parameter is required.
|
|
6620
|
+
*
|
|
6621
|
+
* @example
|
|
6622
|
+
* common
|
|
6623
|
+
*/
|
|
6624
|
+
playCode?: string;
|
|
6625
|
+
/**
|
|
6626
|
+
* @remarks
|
|
6627
|
+
* This parameter is required.
|
|
6628
|
+
*
|
|
6629
|
+
* @example
|
|
6630
|
+
* 0FC6636E-380A-5369-AE01-D1C15BB9B254
|
|
6631
|
+
*/
|
|
6632
|
+
requestId?: string;
|
|
6633
|
+
static names(): { [key: string]: string } {
|
|
6634
|
+
return {
|
|
6635
|
+
analysisNodes: 'analysisNodes',
|
|
6636
|
+
conversationList: 'conversationList',
|
|
6637
|
+
metaData: 'metaData',
|
|
6638
|
+
playCode: 'playCode',
|
|
6639
|
+
requestId: 'requestId',
|
|
6640
|
+
};
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6643
|
+
static types(): { [key: string]: any } {
|
|
6644
|
+
return {
|
|
6645
|
+
analysisNodes: { 'type': 'array', 'itemType': 'string' },
|
|
6646
|
+
conversationList: { 'type': 'array', 'itemType': CreateDialogAnalysisTaskRequestConversationList },
|
|
6647
|
+
metaData: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
6648
|
+
playCode: 'string',
|
|
6649
|
+
requestId: 'string',
|
|
6650
|
+
};
|
|
6651
|
+
}
|
|
6652
|
+
|
|
6653
|
+
validate() {
|
|
6654
|
+
if(Array.isArray(this.analysisNodes)) {
|
|
6655
|
+
$dara.Model.validateArray(this.analysisNodes);
|
|
6656
|
+
}
|
|
6657
|
+
if(Array.isArray(this.conversationList)) {
|
|
6658
|
+
$dara.Model.validateArray(this.conversationList);
|
|
6659
|
+
}
|
|
6660
|
+
if(this.metaData) {
|
|
6661
|
+
$dara.Model.validateMap(this.metaData);
|
|
6662
|
+
}
|
|
6663
|
+
super.validate();
|
|
6664
|
+
}
|
|
6665
|
+
|
|
6666
|
+
constructor(map?: { [key: string]: any }) {
|
|
6667
|
+
super(map);
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
|
|
6671
|
+
export class CreateDialogAnalysisTaskResponseBody extends $dara.Model {
|
|
6672
|
+
/**
|
|
6673
|
+
* @example
|
|
6674
|
+
* null
|
|
6675
|
+
*/
|
|
6676
|
+
cost?: number;
|
|
6677
|
+
data?: string[];
|
|
6678
|
+
/**
|
|
6679
|
+
* @example
|
|
6680
|
+
* null
|
|
6681
|
+
*/
|
|
6682
|
+
dataType?: string;
|
|
6683
|
+
/**
|
|
6684
|
+
* @example
|
|
6685
|
+
* 0
|
|
6686
|
+
*/
|
|
6687
|
+
errCode?: string;
|
|
6688
|
+
/**
|
|
6689
|
+
* @example
|
|
6690
|
+
* ok
|
|
6691
|
+
*/
|
|
6692
|
+
message?: string;
|
|
6693
|
+
/**
|
|
6694
|
+
* @example
|
|
6695
|
+
* EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258
|
|
6696
|
+
*/
|
|
6697
|
+
requestId?: string;
|
|
6698
|
+
/**
|
|
6699
|
+
* @example
|
|
6700
|
+
* true
|
|
6701
|
+
*/
|
|
6702
|
+
success?: boolean;
|
|
6703
|
+
/**
|
|
6704
|
+
* @example
|
|
6705
|
+
* 2024-04-24 11:54:34
|
|
6706
|
+
*/
|
|
6707
|
+
time?: string;
|
|
6708
|
+
static names(): { [key: string]: string } {
|
|
6709
|
+
return {
|
|
6710
|
+
cost: 'cost',
|
|
6711
|
+
data: 'data',
|
|
6712
|
+
dataType: 'dataType',
|
|
6713
|
+
errCode: 'errCode',
|
|
6714
|
+
message: 'message',
|
|
6715
|
+
requestId: 'requestId',
|
|
6716
|
+
success: 'success',
|
|
6717
|
+
time: 'time',
|
|
6718
|
+
};
|
|
6719
|
+
}
|
|
6720
|
+
|
|
6721
|
+
static types(): { [key: string]: any } {
|
|
6722
|
+
return {
|
|
6723
|
+
cost: 'number',
|
|
6724
|
+
data: { 'type': 'array', 'itemType': 'string' },
|
|
6725
|
+
dataType: 'string',
|
|
6726
|
+
errCode: 'string',
|
|
6727
|
+
message: 'string',
|
|
6728
|
+
requestId: 'string',
|
|
6729
|
+
success: 'boolean',
|
|
6730
|
+
time: 'string',
|
|
6731
|
+
};
|
|
6732
|
+
}
|
|
6733
|
+
|
|
6734
|
+
validate() {
|
|
6735
|
+
if(Array.isArray(this.data)) {
|
|
6736
|
+
$dara.Model.validateArray(this.data);
|
|
6737
|
+
}
|
|
6738
|
+
super.validate();
|
|
6739
|
+
}
|
|
6740
|
+
|
|
6741
|
+
constructor(map?: { [key: string]: any }) {
|
|
6742
|
+
super(map);
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6746
|
+
export class CreateDialogAnalysisTaskResponse extends $dara.Model {
|
|
6747
|
+
headers?: { [key: string]: string };
|
|
6748
|
+
statusCode?: number;
|
|
6749
|
+
body?: CreateDialogAnalysisTaskResponseBody;
|
|
6750
|
+
static names(): { [key: string]: string } {
|
|
6751
|
+
return {
|
|
6752
|
+
headers: 'headers',
|
|
6753
|
+
statusCode: 'statusCode',
|
|
6754
|
+
body: 'body',
|
|
6755
|
+
};
|
|
6756
|
+
}
|
|
6757
|
+
|
|
6758
|
+
static types(): { [key: string]: any } {
|
|
6759
|
+
return {
|
|
6760
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
6761
|
+
statusCode: 'number',
|
|
6762
|
+
body: CreateDialogAnalysisTaskResponseBody,
|
|
6763
|
+
};
|
|
6764
|
+
}
|
|
6765
|
+
|
|
6766
|
+
validate() {
|
|
6767
|
+
if(this.headers) {
|
|
6768
|
+
$dara.Model.validateMap(this.headers);
|
|
6769
|
+
}
|
|
6770
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
6771
|
+
(this.body as any).validate();
|
|
6772
|
+
}
|
|
6773
|
+
super.validate();
|
|
6774
|
+
}
|
|
6775
|
+
|
|
6776
|
+
constructor(map?: { [key: string]: any }) {
|
|
6777
|
+
super(map);
|
|
6778
|
+
}
|
|
6779
|
+
}
|
|
6780
|
+
|
|
6534
6781
|
export class CreateDocsSummaryTaskRequest extends $dara.Model {
|
|
6535
6782
|
/**
|
|
6536
6783
|
* @remarks
|
|
@@ -13088,6 +13335,72 @@ export default class Client extends OpenApi {
|
|
|
13088
13335
|
return await this.createDialogWithOptions(workspaceId, request, headers, runtime);
|
|
13089
13336
|
}
|
|
13090
13337
|
|
|
13338
|
+
/**
|
|
13339
|
+
* 创建会话分析任务
|
|
13340
|
+
*
|
|
13341
|
+
* @param request - CreateDialogAnalysisTaskRequest
|
|
13342
|
+
* @param headers - map
|
|
13343
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
13344
|
+
* @returns CreateDialogAnalysisTaskResponse
|
|
13345
|
+
*/
|
|
13346
|
+
async createDialogAnalysisTaskWithOptions(workspaceId: string, request: CreateDialogAnalysisTaskRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<CreateDialogAnalysisTaskResponse> {
|
|
13347
|
+
request.validate();
|
|
13348
|
+
let body : {[key: string ]: any} = { };
|
|
13349
|
+
if (!$dara.isNull(request.analysisNodes)) {
|
|
13350
|
+
body["analysisNodes"] = request.analysisNodes;
|
|
13351
|
+
}
|
|
13352
|
+
|
|
13353
|
+
if (!$dara.isNull(request.conversationList)) {
|
|
13354
|
+
body["conversationList"] = request.conversationList;
|
|
13355
|
+
}
|
|
13356
|
+
|
|
13357
|
+
if (!$dara.isNull(request.metaData)) {
|
|
13358
|
+
body["metaData"] = request.metaData;
|
|
13359
|
+
}
|
|
13360
|
+
|
|
13361
|
+
if (!$dara.isNull(request.playCode)) {
|
|
13362
|
+
body["playCode"] = request.playCode;
|
|
13363
|
+
}
|
|
13364
|
+
|
|
13365
|
+
if (!$dara.isNull(request.requestId)) {
|
|
13366
|
+
body["requestId"] = request.requestId;
|
|
13367
|
+
}
|
|
13368
|
+
|
|
13369
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
13370
|
+
headers: headers,
|
|
13371
|
+
body: OpenApiUtil.parseToMap(body),
|
|
13372
|
+
});
|
|
13373
|
+
let params = new $OpenApiUtil.Params({
|
|
13374
|
+
action: "CreateDialogAnalysisTask",
|
|
13375
|
+
version: "2024-06-28",
|
|
13376
|
+
protocol: "HTTPS",
|
|
13377
|
+
pathname: `/${$dara.URL.percentEncode(workspaceId)}/api/virtualHuman/dialog/analysis/submit`,
|
|
13378
|
+
method: "POST",
|
|
13379
|
+
authType: "AK",
|
|
13380
|
+
style: "ROA",
|
|
13381
|
+
reqBodyType: "json",
|
|
13382
|
+
bodyType: "json",
|
|
13383
|
+
});
|
|
13384
|
+
if ($dara.isNull(this._signatureVersion) || this._signatureVersion != "v4") {
|
|
13385
|
+
return $dara.cast<CreateDialogAnalysisTaskResponse>(await this.callApi(params, req, runtime), new CreateDialogAnalysisTaskResponse({}));
|
|
13386
|
+
} else {
|
|
13387
|
+
return $dara.cast<CreateDialogAnalysisTaskResponse>(await this.execute(params, req, runtime), new CreateDialogAnalysisTaskResponse({}));
|
|
13388
|
+
}
|
|
13389
|
+
|
|
13390
|
+
}
|
|
13391
|
+
|
|
13392
|
+
/**
|
|
13393
|
+
* 创建会话分析任务
|
|
13394
|
+
*
|
|
13395
|
+
* @param request - CreateDialogAnalysisTaskRequest
|
|
13396
|
+
* @returns CreateDialogAnalysisTaskResponse
|
|
13397
|
+
*/
|
|
13398
|
+
async createDialogAnalysisTask(workspaceId: string, request: CreateDialogAnalysisTaskRequest): Promise<CreateDialogAnalysisTaskResponse> {
|
|
13399
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
13400
|
+
let headers : {[key: string ]: string} = { };
|
|
13401
|
+
return await this.createDialogAnalysisTaskWithOptions(workspaceId, request, headers, runtime);
|
|
13402
|
+
}
|
|
13403
|
+
|
|
13091
13404
|
/**
|
|
13092
13405
|
* 创建财报总结任务
|
|
13093
13406
|
*
|