@alicloud/dianjin20240628 1.9.1 → 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 +174 -0
- package/dist/client.js +222 -5
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +333 -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
|
|
@@ -3664,6 +3731,7 @@ export class RealTimeDialogResponseBodyChoicesDelta extends $dara.Model {
|
|
|
3664
3731
|
intentionCode?: string;
|
|
3665
3732
|
intentionName?: string;
|
|
3666
3733
|
intentionScript?: string;
|
|
3734
|
+
interrupt?: boolean;
|
|
3667
3735
|
/**
|
|
3668
3736
|
* @example
|
|
3669
3737
|
* null
|
|
@@ -3684,6 +3752,7 @@ export class RealTimeDialogResponseBodyChoicesDelta extends $dara.Model {
|
|
|
3684
3752
|
intentionCode: 'intentionCode',
|
|
3685
3753
|
intentionName: 'intentionName',
|
|
3686
3754
|
intentionScript: 'intentionScript',
|
|
3755
|
+
interrupt: 'interrupt',
|
|
3687
3756
|
recommendIntention: 'recommendIntention',
|
|
3688
3757
|
recommendScript: 'recommendScript',
|
|
3689
3758
|
selfDirectedScript: 'selfDirectedScript',
|
|
@@ -3699,6 +3768,7 @@ export class RealTimeDialogResponseBodyChoicesDelta extends $dara.Model {
|
|
|
3699
3768
|
intentionCode: 'string',
|
|
3700
3769
|
intentionName: 'string',
|
|
3701
3770
|
intentionScript: 'string',
|
|
3771
|
+
interrupt: 'boolean',
|
|
3702
3772
|
recommendIntention: 'string',
|
|
3703
3773
|
recommendScript: 'string',
|
|
3704
3774
|
selfDirectedScript: 'string',
|
|
@@ -3741,6 +3811,7 @@ export class RealTimeDialogResponseBodyChoicesMessage extends $dara.Model {
|
|
|
3741
3811
|
intentionCode?: string;
|
|
3742
3812
|
intentionName?: string;
|
|
3743
3813
|
intentionScript?: string;
|
|
3814
|
+
interrupt?: boolean;
|
|
3744
3815
|
/**
|
|
3745
3816
|
* @example
|
|
3746
3817
|
* null
|
|
@@ -3765,6 +3836,7 @@ export class RealTimeDialogResponseBodyChoicesMessage extends $dara.Model {
|
|
|
3765
3836
|
intentionCode: 'intentionCode',
|
|
3766
3837
|
intentionName: 'intentionName',
|
|
3767
3838
|
intentionScript: 'intentionScript',
|
|
3839
|
+
interrupt: 'interrupt',
|
|
3768
3840
|
recommendIntention: 'recommendIntention',
|
|
3769
3841
|
recommendScript: 'recommendScript',
|
|
3770
3842
|
selfDirectedScript: 'selfDirectedScript',
|
|
@@ -3780,6 +3852,7 @@ export class RealTimeDialogResponseBodyChoicesMessage extends $dara.Model {
|
|
|
3780
3852
|
intentionCode: 'string',
|
|
3781
3853
|
intentionName: 'string',
|
|
3782
3854
|
intentionScript: 'string',
|
|
3855
|
+
interrupt: 'boolean',
|
|
3783
3856
|
recommendIntention: 'string',
|
|
3784
3857
|
recommendScript: 'string',
|
|
3785
3858
|
selfDirectedScript: 'string',
|
|
@@ -6525,6 +6598,186 @@ export class CreateDialogResponse extends $dara.Model {
|
|
|
6525
6598
|
}
|
|
6526
6599
|
}
|
|
6527
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
|
+
|
|
6528
6781
|
export class CreateDocsSummaryTaskRequest extends $dara.Model {
|
|
6529
6782
|
/**
|
|
6530
6783
|
* @remarks
|
|
@@ -10785,6 +11038,7 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10785
11038
|
* false
|
|
10786
11039
|
*/
|
|
10787
11040
|
recommend?: boolean;
|
|
11041
|
+
scriptContentPlayed?: string;
|
|
10788
11042
|
/**
|
|
10789
11043
|
* @remarks
|
|
10790
11044
|
* This parameter is required.
|
|
@@ -10798,6 +11052,7 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10798
11052
|
* false
|
|
10799
11053
|
*/
|
|
10800
11054
|
stream?: boolean;
|
|
11055
|
+
userVad?: boolean;
|
|
10801
11056
|
static names(): { [key: string]: string } {
|
|
10802
11057
|
return {
|
|
10803
11058
|
analysis: 'analysis',
|
|
@@ -10806,8 +11061,10 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10806
11061
|
dialogMemoryTurns: 'dialogMemoryTurns',
|
|
10807
11062
|
metaData: 'metaData',
|
|
10808
11063
|
recommend: 'recommend',
|
|
11064
|
+
scriptContentPlayed: 'scriptContentPlayed',
|
|
10809
11065
|
sessionId: 'sessionId',
|
|
10810
11066
|
stream: 'stream',
|
|
11067
|
+
userVad: 'userVad',
|
|
10811
11068
|
};
|
|
10812
11069
|
}
|
|
10813
11070
|
|
|
@@ -10819,8 +11076,10 @@ export class RealTimeDialogRequest extends $dara.Model {
|
|
|
10819
11076
|
dialogMemoryTurns: 'number',
|
|
10820
11077
|
metaData: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
10821
11078
|
recommend: 'boolean',
|
|
11079
|
+
scriptContentPlayed: 'string',
|
|
10822
11080
|
sessionId: 'string',
|
|
10823
11081
|
stream: 'boolean',
|
|
11082
|
+
userVad: 'boolean',
|
|
10824
11083
|
};
|
|
10825
11084
|
}
|
|
10826
11085
|
|
|
@@ -13076,6 +13335,72 @@ export default class Client extends OpenApi {
|
|
|
13076
13335
|
return await this.createDialogWithOptions(workspaceId, request, headers, runtime);
|
|
13077
13336
|
}
|
|
13078
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
|
+
|
|
13079
13404
|
/**
|
|
13080
13405
|
* 创建财报总结任务
|
|
13081
13406
|
*
|
|
@@ -14725,6 +15050,10 @@ export default class Client extends OpenApi {
|
|
|
14725
15050
|
body["recommend"] = request.recommend;
|
|
14726
15051
|
}
|
|
14727
15052
|
|
|
15053
|
+
if (!$dara.isNull(request.scriptContentPlayed)) {
|
|
15054
|
+
body["scriptContentPlayed"] = request.scriptContentPlayed;
|
|
15055
|
+
}
|
|
15056
|
+
|
|
14728
15057
|
if (!$dara.isNull(request.sessionId)) {
|
|
14729
15058
|
body["sessionId"] = request.sessionId;
|
|
14730
15059
|
}
|
|
@@ -14733,6 +15062,10 @@ export default class Client extends OpenApi {
|
|
|
14733
15062
|
body["stream"] = request.stream;
|
|
14734
15063
|
}
|
|
14735
15064
|
|
|
15065
|
+
if (!$dara.isNull(request.userVad)) {
|
|
15066
|
+
body["userVad"] = request.userVad;
|
|
15067
|
+
}
|
|
15068
|
+
|
|
14736
15069
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
14737
15070
|
headers: headers,
|
|
14738
15071
|
body: OpenApiUtil.parseToMap(body),
|