@alicloud/dianjin20240628 1.9.2 → 1.10.1
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 +175 -0
- package/dist/client.js +213 -5
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +324 -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
|
|
@@ -10786,6 +11033,11 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10786
11033
|
*/
|
|
10787
11034
|
dialogMemoryTurns?: number;
|
|
10788
11035
|
metaData?: { [key: string]: any };
|
|
11036
|
+
/**
|
|
11037
|
+
* @example
|
|
11038
|
+
* common
|
|
11039
|
+
*/
|
|
11040
|
+
opType?: string;
|
|
10789
11041
|
/**
|
|
10790
11042
|
* @example
|
|
10791
11043
|
* false
|
|
@@ -10813,6 +11065,7 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10813
11065
|
conversationModel: 'conversationModel',
|
|
10814
11066
|
dialogMemoryTurns: 'dialogMemoryTurns',
|
|
10815
11067
|
metaData: 'metaData',
|
|
11068
|
+
opType: 'opType',
|
|
10816
11069
|
recommend: 'recommend',
|
|
10817
11070
|
scriptContentPlayed: 'scriptContentPlayed',
|
|
10818
11071
|
sessionId: 'sessionId',
|
|
@@ -10828,6 +11081,7 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10828
11081
|
conversationModel: { 'type': 'array', 'itemType': RealTimeDialogRequestConversationModel },
|
|
10829
11082
|
dialogMemoryTurns: 'number',
|
|
10830
11083
|
metaData: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
11084
|
+
opType: 'string',
|
|
10831
11085
|
recommend: 'boolean',
|
|
10832
11086
|
scriptContentPlayed: 'string',
|
|
10833
11087
|
sessionId: 'string',
|
|
@@ -13088,6 +13342,72 @@ export default class Client extends OpenApi {
|
|
|
13088
13342
|
return await this.createDialogWithOptions(workspaceId, request, headers, runtime);
|
|
13089
13343
|
}
|
|
13090
13344
|
|
|
13345
|
+
/**
|
|
13346
|
+
* 创建会话分析任务
|
|
13347
|
+
*
|
|
13348
|
+
* @param request - CreateDialogAnalysisTaskRequest
|
|
13349
|
+
* @param headers - map
|
|
13350
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
13351
|
+
* @returns CreateDialogAnalysisTaskResponse
|
|
13352
|
+
*/
|
|
13353
|
+
async createDialogAnalysisTaskWithOptions(workspaceId: string, request: CreateDialogAnalysisTaskRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<CreateDialogAnalysisTaskResponse> {
|
|
13354
|
+
request.validate();
|
|
13355
|
+
let body : {[key: string ]: any} = { };
|
|
13356
|
+
if (!$dara.isNull(request.analysisNodes)) {
|
|
13357
|
+
body["analysisNodes"] = request.analysisNodes;
|
|
13358
|
+
}
|
|
13359
|
+
|
|
13360
|
+
if (!$dara.isNull(request.conversationList)) {
|
|
13361
|
+
body["conversationList"] = request.conversationList;
|
|
13362
|
+
}
|
|
13363
|
+
|
|
13364
|
+
if (!$dara.isNull(request.metaData)) {
|
|
13365
|
+
body["metaData"] = request.metaData;
|
|
13366
|
+
}
|
|
13367
|
+
|
|
13368
|
+
if (!$dara.isNull(request.playCode)) {
|
|
13369
|
+
body["playCode"] = request.playCode;
|
|
13370
|
+
}
|
|
13371
|
+
|
|
13372
|
+
if (!$dara.isNull(request.requestId)) {
|
|
13373
|
+
body["requestId"] = request.requestId;
|
|
13374
|
+
}
|
|
13375
|
+
|
|
13376
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
13377
|
+
headers: headers,
|
|
13378
|
+
body: OpenApiUtil.parseToMap(body),
|
|
13379
|
+
});
|
|
13380
|
+
let params = new $OpenApiUtil.Params({
|
|
13381
|
+
action: "CreateDialogAnalysisTask",
|
|
13382
|
+
version: "2024-06-28",
|
|
13383
|
+
protocol: "HTTPS",
|
|
13384
|
+
pathname: `/${$dara.URL.percentEncode(workspaceId)}/api/virtualHuman/dialog/analysis/submit`,
|
|
13385
|
+
method: "POST",
|
|
13386
|
+
authType: "AK",
|
|
13387
|
+
style: "ROA",
|
|
13388
|
+
reqBodyType: "json",
|
|
13389
|
+
bodyType: "json",
|
|
13390
|
+
});
|
|
13391
|
+
if ($dara.isNull(this._signatureVersion) || this._signatureVersion != "v4") {
|
|
13392
|
+
return $dara.cast<CreateDialogAnalysisTaskResponse>(await this.callApi(params, req, runtime), new CreateDialogAnalysisTaskResponse({}));
|
|
13393
|
+
} else {
|
|
13394
|
+
return $dara.cast<CreateDialogAnalysisTaskResponse>(await this.execute(params, req, runtime), new CreateDialogAnalysisTaskResponse({}));
|
|
13395
|
+
}
|
|
13396
|
+
|
|
13397
|
+
}
|
|
13398
|
+
|
|
13399
|
+
/**
|
|
13400
|
+
* 创建会话分析任务
|
|
13401
|
+
*
|
|
13402
|
+
* @param request - CreateDialogAnalysisTaskRequest
|
|
13403
|
+
* @returns CreateDialogAnalysisTaskResponse
|
|
13404
|
+
*/
|
|
13405
|
+
async createDialogAnalysisTask(workspaceId: string, request: CreateDialogAnalysisTaskRequest): Promise<CreateDialogAnalysisTaskResponse> {
|
|
13406
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
13407
|
+
let headers : {[key: string ]: string} = { };
|
|
13408
|
+
return await this.createDialogAnalysisTaskWithOptions(workspaceId, request, headers, runtime);
|
|
13409
|
+
}
|
|
13410
|
+
|
|
13091
13411
|
/**
|
|
13092
13412
|
* 创建财报总结任务
|
|
13093
13413
|
*
|
|
@@ -14733,6 +15053,10 @@ export default class Client extends OpenApi {
|
|
|
14733
15053
|
body["metaData"] = request.metaData;
|
|
14734
15054
|
}
|
|
14735
15055
|
|
|
15056
|
+
if (!$dara.isNull(request.opType)) {
|
|
15057
|
+
body["opType"] = request.opType;
|
|
15058
|
+
}
|
|
15059
|
+
|
|
14736
15060
|
if (!$dara.isNull(request.recommend)) {
|
|
14737
15061
|
body["recommend"] = request.recommend;
|
|
14738
15062
|
}
|