@alicloud/aimiaobi20230801 1.32.1 → 1.33.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 +297 -4
- package/dist/client.js +2382 -6
- package/dist/client.js.map +1 -1
- package/dist/models/AddAuditTermsRequest.d.ts +1 -0
- package/dist/models/AddAuditTermsRequest.js +5 -0
- package/dist/models/AddAuditTermsRequest.js.map +1 -1
- package/dist/models/AddAuditTermsShrinkRequest.d.ts +37 -0
- package/dist/models/AddAuditTermsShrinkRequest.js +66 -0
- package/dist/models/AddAuditTermsShrinkRequest.js.map +1 -0
- package/dist/models/DeleteFactAuditUrlRequest.d.ts +29 -0
- package/dist/models/DeleteFactAuditUrlRequest.js +60 -0
- package/dist/models/DeleteFactAuditUrlRequest.js.map +1 -0
- package/dist/models/DeleteFactAuditUrlResponse.d.ts +19 -0
- package/dist/models/DeleteFactAuditUrlResponse.js +69 -0
- package/dist/models/DeleteFactAuditUrlResponse.js.map +1 -0
- package/dist/models/DeleteFactAuditUrlResponseBody.d.ts +46 -0
- package/dist/models/DeleteFactAuditUrlResponseBody.js +68 -0
- package/dist/models/DeleteFactAuditUrlResponseBody.js.map +1 -0
- package/dist/models/EditAuditTermsRequest.d.ts +1 -0
- package/dist/models/EditAuditTermsRequest.js +5 -0
- package/dist/models/EditAuditTermsRequest.js.map +1 -1
- package/dist/models/EditAuditTermsShrinkRequest.d.ts +42 -0
- package/dist/models/EditAuditTermsShrinkRequest.js +68 -0
- package/dist/models/EditAuditTermsShrinkRequest.js.map +1 -0
- package/dist/models/GetFactAuditUrlRequest.d.ts +21 -0
- package/dist/models/GetFactAuditUrlRequest.js +58 -0
- package/dist/models/GetFactAuditUrlRequest.js.map +1 -0
- package/dist/models/GetFactAuditUrlResponse.d.ts +19 -0
- package/dist/models/GetFactAuditUrlResponse.js +69 -0
- package/dist/models/GetFactAuditUrlResponse.js.map +1 -0
- package/dist/models/GetFactAuditUrlResponseBody.d.ts +46 -0
- package/dist/models/GetFactAuditUrlResponseBody.js +71 -0
- package/dist/models/GetFactAuditUrlResponseBody.js.map +1 -0
- package/dist/models/ListAuditTermsResponseBody.d.ts +1 -0
- package/dist/models/ListAuditTermsResponseBody.js +5 -0
- package/dist/models/ListAuditTermsResponseBody.js.map +1 -1
- package/dist/models/SubmitFactAuditUrlRequest.d.ts +29 -0
- package/dist/models/SubmitFactAuditUrlRequest.js +60 -0
- package/dist/models/SubmitFactAuditUrlRequest.js.map +1 -0
- package/dist/models/SubmitFactAuditUrlResponse.d.ts +19 -0
- package/dist/models/SubmitFactAuditUrlResponse.js +69 -0
- package/dist/models/SubmitFactAuditUrlResponse.js.map +1 -0
- package/dist/models/SubmitFactAuditUrlResponseBody.d.ts +46 -0
- package/dist/models/SubmitFactAuditUrlResponseBody.js +68 -0
- package/dist/models/SubmitFactAuditUrlResponseBody.js.map +1 -0
- package/dist/models/model.d.ts +11 -0
- package/dist/models/model.js +35 -13
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +2859 -543
- package/src/models/AddAuditTermsRequest.ts +6 -0
- package/src/models/AddAuditTermsShrinkRequest.ts +58 -0
- package/src/models/DeleteFactAuditUrlRequest.ts +44 -0
- package/src/models/DeleteFactAuditUrlResponse.ts +40 -0
- package/src/models/DeleteFactAuditUrlResponseBody.ts +69 -0
- package/src/models/EditAuditTermsRequest.ts +6 -0
- package/src/models/EditAuditTermsShrinkRequest.ts +65 -0
- package/src/models/GetFactAuditUrlRequest.ts +34 -0
- package/src/models/GetFactAuditUrlResponse.ts +40 -0
- package/src/models/GetFactAuditUrlResponseBody.ts +72 -0
- package/src/models/ListAuditTermsResponseBody.ts +6 -0
- package/src/models/SubmitFactAuditUrlRequest.ts +44 -0
- package/src/models/SubmitFactAuditUrlResponse.ts +40 -0
- package/src/models/SubmitFactAuditUrlResponseBody.ts +69 -0
- package/src/models/model.ts +11 -0
package/src/client.ts
CHANGED
|
@@ -32,13 +32,23 @@ export default class Client extends OpenApi {
|
|
|
32
32
|
/**
|
|
33
33
|
* 添加审核自定义词库记录
|
|
34
34
|
*
|
|
35
|
-
* @param
|
|
35
|
+
* @param tmpReq - AddAuditTermsRequest
|
|
36
36
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
37
37
|
* @returns AddAuditTermsResponse
|
|
38
38
|
*/
|
|
39
|
-
async addAuditTermsWithOptions(
|
|
40
|
-
|
|
39
|
+
async addAuditTermsWithOptions(tmpReq: $_model.AddAuditTermsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AddAuditTermsResponse> {
|
|
40
|
+
tmpReq.validate();
|
|
41
|
+
let request = new $_model.AddAuditTermsShrinkRequest({ });
|
|
42
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
43
|
+
if (!$dara.isNull(tmpReq.exceptionWord)) {
|
|
44
|
+
request.exceptionWordShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.exceptionWord, "ExceptionWord", "json");
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
let body : {[key: string ]: any} = { };
|
|
48
|
+
if (!$dara.isNull(request.exceptionWordShrink)) {
|
|
49
|
+
body["ExceptionWord"] = request.exceptionWordShrink;
|
|
50
|
+
}
|
|
51
|
+
|
|
42
52
|
if (!$dara.isNull(request.keyword)) {
|
|
43
53
|
body["Keyword"] = request.keyword;
|
|
44
54
|
}
|
|
@@ -1205,6 +1215,52 @@ export default class Client extends OpenApi {
|
|
|
1205
1215
|
return await this.deleteDocsWithOptions(request, runtime);
|
|
1206
1216
|
}
|
|
1207
1217
|
|
|
1218
|
+
/**
|
|
1219
|
+
* 删除指定的用于事实性审核的 URL。
|
|
1220
|
+
*
|
|
1221
|
+
* @param request - DeleteFactAuditUrlRequest
|
|
1222
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1223
|
+
* @returns DeleteFactAuditUrlResponse
|
|
1224
|
+
*/
|
|
1225
|
+
async deleteFactAuditUrlWithOptions(request: $_model.DeleteFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteFactAuditUrlResponse> {
|
|
1226
|
+
request.validate();
|
|
1227
|
+
let body : {[key: string ]: any} = { };
|
|
1228
|
+
if (!$dara.isNull(request.url)) {
|
|
1229
|
+
body["Url"] = request.url;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
1233
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
1237
|
+
body: OpenApiUtil.parseToMap(body),
|
|
1238
|
+
});
|
|
1239
|
+
let params = new $OpenApiUtil.Params({
|
|
1240
|
+
action: "DeleteFactAuditUrl",
|
|
1241
|
+
version: "2023-08-01",
|
|
1242
|
+
protocol: "HTTPS",
|
|
1243
|
+
pathname: "/",
|
|
1244
|
+
method: "POST",
|
|
1245
|
+
authType: "AK",
|
|
1246
|
+
style: "RPC",
|
|
1247
|
+
reqBodyType: "formData",
|
|
1248
|
+
bodyType: "json",
|
|
1249
|
+
});
|
|
1250
|
+
return $dara.cast<$_model.DeleteFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.DeleteFactAuditUrlResponse({}));
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* 删除指定的用于事实性审核的 URL。
|
|
1255
|
+
*
|
|
1256
|
+
* @param request - DeleteFactAuditUrlRequest
|
|
1257
|
+
* @returns DeleteFactAuditUrlResponse
|
|
1258
|
+
*/
|
|
1259
|
+
async deleteFactAuditUrl(request: $_model.DeleteFactAuditUrlRequest): Promise<$_model.DeleteFactAuditUrlResponse> {
|
|
1260
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
1261
|
+
return await this.deleteFactAuditUrlWithOptions(request, runtime);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1208
1264
|
/**
|
|
1209
1265
|
* 文档管理-删除。
|
|
1210
1266
|
*
|
|
@@ -1504,13 +1560,23 @@ export default class Client extends OpenApi {
|
|
|
1504
1560
|
/**
|
|
1505
1561
|
* 编辑审核自定义词库记录
|
|
1506
1562
|
*
|
|
1507
|
-
* @param
|
|
1563
|
+
* @param tmpReq - EditAuditTermsRequest
|
|
1508
1564
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
1509
1565
|
* @returns EditAuditTermsResponse
|
|
1510
1566
|
*/
|
|
1511
|
-
async editAuditTermsWithOptions(
|
|
1512
|
-
|
|
1567
|
+
async editAuditTermsWithOptions(tmpReq: $_model.EditAuditTermsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EditAuditTermsResponse> {
|
|
1568
|
+
tmpReq.validate();
|
|
1569
|
+
let request = new $_model.EditAuditTermsShrinkRequest({ });
|
|
1570
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1571
|
+
if (!$dara.isNull(tmpReq.exceptionWord)) {
|
|
1572
|
+
request.exceptionWordShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.exceptionWord, "ExceptionWord", "json");
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1513
1575
|
let body : {[key: string ]: any} = { };
|
|
1576
|
+
if (!$dara.isNull(request.exceptionWordShrink)) {
|
|
1577
|
+
body["ExceptionWord"] = request.exceptionWordShrink;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1514
1580
|
if (!$dara.isNull(request.id)) {
|
|
1515
1581
|
body["Id"] = request.id;
|
|
1516
1582
|
}
|
|
@@ -3145,6 +3211,48 @@ export default class Client extends OpenApi {
|
|
|
3145
3211
|
return await this.getEnterpriseVocAnalysisTaskWithOptions(request, runtime);
|
|
3146
3212
|
}
|
|
3147
3213
|
|
|
3214
|
+
/**
|
|
3215
|
+
* 获取当前正用于事实性审核的信源 URL。
|
|
3216
|
+
*
|
|
3217
|
+
* @param request - GetFactAuditUrlRequest
|
|
3218
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3219
|
+
* @returns GetFactAuditUrlResponse
|
|
3220
|
+
*/
|
|
3221
|
+
async getFactAuditUrlWithOptions(request: $_model.GetFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetFactAuditUrlResponse> {
|
|
3222
|
+
request.validate();
|
|
3223
|
+
let body : {[key: string ]: any} = { };
|
|
3224
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
3225
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
3229
|
+
body: OpenApiUtil.parseToMap(body),
|
|
3230
|
+
});
|
|
3231
|
+
let params = new $OpenApiUtil.Params({
|
|
3232
|
+
action: "GetFactAuditUrl",
|
|
3233
|
+
version: "2023-08-01",
|
|
3234
|
+
protocol: "HTTPS",
|
|
3235
|
+
pathname: "/",
|
|
3236
|
+
method: "POST",
|
|
3237
|
+
authType: "AK",
|
|
3238
|
+
style: "RPC",
|
|
3239
|
+
reqBodyType: "formData",
|
|
3240
|
+
bodyType: "json",
|
|
3241
|
+
});
|
|
3242
|
+
return $dara.cast<$_model.GetFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.GetFactAuditUrlResponse({}));
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
/**
|
|
3246
|
+
* 获取当前正用于事实性审核的信源 URL。
|
|
3247
|
+
*
|
|
3248
|
+
* @param request - GetFactAuditUrlRequest
|
|
3249
|
+
* @returns GetFactAuditUrlResponse
|
|
3250
|
+
*/
|
|
3251
|
+
async getFactAuditUrl(request: $_model.GetFactAuditUrlRequest): Promise<$_model.GetFactAuditUrlResponse> {
|
|
3252
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
3253
|
+
return await this.getFactAuditUrlWithOptions(request, runtime);
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3148
3256
|
/**
|
|
3149
3257
|
* 妙读获得文档字数
|
|
3150
3258
|
*
|
|
@@ -6339,6 +6447,58 @@ export default class Client extends OpenApi {
|
|
|
6339
6447
|
return await this.queryAuditTaskWithOptions(request, runtime);
|
|
6340
6448
|
}
|
|
6341
6449
|
|
|
6450
|
+
/**
|
|
6451
|
+
* 内容缩写
|
|
6452
|
+
*
|
|
6453
|
+
* @param request - RunAbbreviationContentRequest
|
|
6454
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6455
|
+
* @returns RunAbbreviationContentResponse
|
|
6456
|
+
*/
|
|
6457
|
+
async *runAbbreviationContentWithSSE(request: $_model.RunAbbreviationContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunAbbreviationContentResponse, any, unknown> {
|
|
6458
|
+
request.validate();
|
|
6459
|
+
let body : {[key: string ]: any} = { };
|
|
6460
|
+
if (!$dara.isNull(request.content)) {
|
|
6461
|
+
body["Content"] = request.content;
|
|
6462
|
+
}
|
|
6463
|
+
|
|
6464
|
+
if (!$dara.isNull(request.prompt)) {
|
|
6465
|
+
body["Prompt"] = request.prompt;
|
|
6466
|
+
}
|
|
6467
|
+
|
|
6468
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
6469
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6470
|
+
}
|
|
6471
|
+
|
|
6472
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6473
|
+
body: OpenApiUtil.parseToMap(body),
|
|
6474
|
+
});
|
|
6475
|
+
let params = new $OpenApiUtil.Params({
|
|
6476
|
+
action: "RunAbbreviationContent",
|
|
6477
|
+
version: "2023-08-01",
|
|
6478
|
+
protocol: "HTTPS",
|
|
6479
|
+
pathname: "/",
|
|
6480
|
+
method: "POST",
|
|
6481
|
+
authType: "AK",
|
|
6482
|
+
style: "RPC",
|
|
6483
|
+
reqBodyType: "formData",
|
|
6484
|
+
bodyType: "json",
|
|
6485
|
+
});
|
|
6486
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6487
|
+
|
|
6488
|
+
for await (let resp of sseResp) {
|
|
6489
|
+
let data = JSON.parse(resp.event.data);
|
|
6490
|
+
yield $dara.cast<$_model.RunAbbreviationContentResponse>({
|
|
6491
|
+
statusCode: resp.statusCode,
|
|
6492
|
+
headers: resp.headers,
|
|
6493
|
+
body: {
|
|
6494
|
+
...data,
|
|
6495
|
+
RequestId: resp.event.id,
|
|
6496
|
+
Message: resp.event.event,
|
|
6497
|
+
},
|
|
6498
|
+
}, new $_model.RunAbbreviationContentResponse({}));
|
|
6499
|
+
}
|
|
6500
|
+
}
|
|
6501
|
+
|
|
6342
6502
|
/**
|
|
6343
6503
|
* 内容缩写
|
|
6344
6504
|
*
|
|
@@ -6389,6 +6549,74 @@ export default class Client extends OpenApi {
|
|
|
6389
6549
|
return await this.runAbbreviationContentWithOptions(request, runtime);
|
|
6390
6550
|
}
|
|
6391
6551
|
|
|
6552
|
+
/**
|
|
6553
|
+
* 妙读生成书籍脑图
|
|
6554
|
+
*
|
|
6555
|
+
* @param request - RunBookBrainmapRequest
|
|
6556
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6557
|
+
* @returns RunBookBrainmapResponse
|
|
6558
|
+
*/
|
|
6559
|
+
async *runBookBrainmapWithSSE(request: $_model.RunBookBrainmapRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookBrainmapResponse, any, unknown> {
|
|
6560
|
+
request.validate();
|
|
6561
|
+
let body : {[key: string ]: any} = { };
|
|
6562
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
6563
|
+
body["CleanCache"] = request.cleanCache;
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6566
|
+
if (!$dara.isNull(request.docId)) {
|
|
6567
|
+
body["DocId"] = request.docId;
|
|
6568
|
+
}
|
|
6569
|
+
|
|
6570
|
+
if (!$dara.isNull(request.nodeNumber)) {
|
|
6571
|
+
body["NodeNumber"] = request.nodeNumber;
|
|
6572
|
+
}
|
|
6573
|
+
|
|
6574
|
+
if (!$dara.isNull(request.prompt)) {
|
|
6575
|
+
body["Prompt"] = request.prompt;
|
|
6576
|
+
}
|
|
6577
|
+
|
|
6578
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
6579
|
+
body["SessionId"] = request.sessionId;
|
|
6580
|
+
}
|
|
6581
|
+
|
|
6582
|
+
if (!$dara.isNull(request.wordNumber)) {
|
|
6583
|
+
body["WordNumber"] = request.wordNumber;
|
|
6584
|
+
}
|
|
6585
|
+
|
|
6586
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
6587
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6590
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6591
|
+
body: OpenApiUtil.parseToMap(body),
|
|
6592
|
+
});
|
|
6593
|
+
let params = new $OpenApiUtil.Params({
|
|
6594
|
+
action: "RunBookBrainmap",
|
|
6595
|
+
version: "2023-08-01",
|
|
6596
|
+
protocol: "HTTPS",
|
|
6597
|
+
pathname: "/",
|
|
6598
|
+
method: "POST",
|
|
6599
|
+
authType: "AK",
|
|
6600
|
+
style: "RPC",
|
|
6601
|
+
reqBodyType: "formData",
|
|
6602
|
+
bodyType: "json",
|
|
6603
|
+
});
|
|
6604
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6605
|
+
|
|
6606
|
+
for await (let resp of sseResp) {
|
|
6607
|
+
let data = JSON.parse(resp.event.data);
|
|
6608
|
+
yield $dara.cast<$_model.RunBookBrainmapResponse>({
|
|
6609
|
+
statusCode: resp.statusCode,
|
|
6610
|
+
headers: resp.headers,
|
|
6611
|
+
body: {
|
|
6612
|
+
...data,
|
|
6613
|
+
RequestId: resp.event.id,
|
|
6614
|
+
Message: resp.event.event,
|
|
6615
|
+
},
|
|
6616
|
+
}, new $_model.RunBookBrainmapResponse({}));
|
|
6617
|
+
}
|
|
6618
|
+
}
|
|
6619
|
+
|
|
6392
6620
|
/**
|
|
6393
6621
|
* 妙读生成书籍脑图
|
|
6394
6622
|
*
|
|
@@ -6455,6 +6683,66 @@ export default class Client extends OpenApi {
|
|
|
6455
6683
|
return await this.runBookBrainmapWithOptions(request, runtime);
|
|
6456
6684
|
}
|
|
6457
6685
|
|
|
6686
|
+
/**
|
|
6687
|
+
* 书籍导读接口
|
|
6688
|
+
*
|
|
6689
|
+
* @param request - RunBookIntroductionRequest
|
|
6690
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6691
|
+
* @returns RunBookIntroductionResponse
|
|
6692
|
+
*/
|
|
6693
|
+
async *runBookIntroductionWithSSE(request: $_model.RunBookIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookIntroductionResponse, any, unknown> {
|
|
6694
|
+
request.validate();
|
|
6695
|
+
let body : {[key: string ]: any} = { };
|
|
6696
|
+
if (!$dara.isNull(request.docId)) {
|
|
6697
|
+
body["DocId"] = request.docId;
|
|
6698
|
+
}
|
|
6699
|
+
|
|
6700
|
+
if (!$dara.isNull(request.keyPointPrompt)) {
|
|
6701
|
+
body["KeyPointPrompt"] = request.keyPointPrompt;
|
|
6702
|
+
}
|
|
6703
|
+
|
|
6704
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
6705
|
+
body["SessionId"] = request.sessionId;
|
|
6706
|
+
}
|
|
6707
|
+
|
|
6708
|
+
if (!$dara.isNull(request.summaryPrompt)) {
|
|
6709
|
+
body["SummaryPrompt"] = request.summaryPrompt;
|
|
6710
|
+
}
|
|
6711
|
+
|
|
6712
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
6713
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6714
|
+
}
|
|
6715
|
+
|
|
6716
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6717
|
+
body: OpenApiUtil.parseToMap(body),
|
|
6718
|
+
});
|
|
6719
|
+
let params = new $OpenApiUtil.Params({
|
|
6720
|
+
action: "RunBookIntroduction",
|
|
6721
|
+
version: "2023-08-01",
|
|
6722
|
+
protocol: "HTTPS",
|
|
6723
|
+
pathname: "/",
|
|
6724
|
+
method: "POST",
|
|
6725
|
+
authType: "AK",
|
|
6726
|
+
style: "RPC",
|
|
6727
|
+
reqBodyType: "formData",
|
|
6728
|
+
bodyType: "json",
|
|
6729
|
+
});
|
|
6730
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6731
|
+
|
|
6732
|
+
for await (let resp of sseResp) {
|
|
6733
|
+
let data = JSON.parse(resp.event.data);
|
|
6734
|
+
yield $dara.cast<$_model.RunBookIntroductionResponse>({
|
|
6735
|
+
statusCode: resp.statusCode,
|
|
6736
|
+
headers: resp.headers,
|
|
6737
|
+
body: {
|
|
6738
|
+
...data,
|
|
6739
|
+
RequestId: resp.event.id,
|
|
6740
|
+
Message: resp.event.event,
|
|
6741
|
+
},
|
|
6742
|
+
}, new $_model.RunBookIntroductionResponse({}));
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6458
6746
|
/**
|
|
6459
6747
|
* 书籍导读接口
|
|
6460
6748
|
*
|
|
@@ -6520,7 +6808,7 @@ export default class Client extends OpenApi {
|
|
|
6520
6808
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
6521
6809
|
* @returns RunBookSmartCardResponse
|
|
6522
6810
|
*/
|
|
6523
|
-
async
|
|
6811
|
+
async *runBookSmartCardWithSSE(request: $_model.RunBookSmartCardRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookSmartCardResponse, any, unknown> {
|
|
6524
6812
|
request.validate();
|
|
6525
6813
|
let body : {[key: string ]: any} = { };
|
|
6526
6814
|
if (!$dara.isNull(request.docId)) {
|
|
@@ -6549,40 +6837,194 @@ export default class Client extends OpenApi {
|
|
|
6549
6837
|
reqBodyType: "formData",
|
|
6550
6838
|
bodyType: "json",
|
|
6551
6839
|
});
|
|
6552
|
-
|
|
6840
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6841
|
+
|
|
6842
|
+
for await (let resp of sseResp) {
|
|
6843
|
+
let data = JSON.parse(resp.event.data);
|
|
6844
|
+
yield $dara.cast<$_model.RunBookSmartCardResponse>({
|
|
6845
|
+
statusCode: resp.statusCode,
|
|
6846
|
+
headers: resp.headers,
|
|
6847
|
+
body: {
|
|
6848
|
+
...data,
|
|
6849
|
+
RequestId: resp.event.id,
|
|
6850
|
+
Message: resp.event.event,
|
|
6851
|
+
},
|
|
6852
|
+
}, new $_model.RunBookSmartCardResponse({}));
|
|
6853
|
+
}
|
|
6553
6854
|
}
|
|
6554
6855
|
|
|
6555
6856
|
/**
|
|
6556
6857
|
* 书籍智能卡片接口
|
|
6557
6858
|
*
|
|
6558
6859
|
* @param request - RunBookSmartCardRequest
|
|
6559
|
-
* @returns RunBookSmartCardResponse
|
|
6560
|
-
*/
|
|
6561
|
-
async runBookSmartCard(request: $_model.RunBookSmartCardRequest): Promise<$_model.RunBookSmartCardResponse> {
|
|
6562
|
-
let runtime = new $dara.RuntimeOptions({ });
|
|
6563
|
-
return await this.runBookSmartCardWithOptions(request, runtime);
|
|
6564
|
-
}
|
|
6565
|
-
|
|
6566
|
-
/**
|
|
6567
|
-
* 客户之声预测
|
|
6568
|
-
*
|
|
6569
|
-
* @param tmpReq - RunCommentGenerationRequest
|
|
6570
6860
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
6571
|
-
* @returns
|
|
6861
|
+
* @returns RunBookSmartCardResponse
|
|
6572
6862
|
*/
|
|
6573
|
-
async
|
|
6574
|
-
|
|
6575
|
-
let
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
request.lengthRangeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lengthRange, "LengthRange", "json");
|
|
6863
|
+
async runBookSmartCardWithOptions(request: $_model.RunBookSmartCardRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunBookSmartCardResponse> {
|
|
6864
|
+
request.validate();
|
|
6865
|
+
let body : {[key: string ]: any} = { };
|
|
6866
|
+
if (!$dara.isNull(request.docId)) {
|
|
6867
|
+
body["DocId"] = request.docId;
|
|
6579
6868
|
}
|
|
6580
6869
|
|
|
6581
|
-
if (!$dara.isNull(
|
|
6582
|
-
|
|
6870
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
6871
|
+
body["SessionId"] = request.sessionId;
|
|
6583
6872
|
}
|
|
6584
6873
|
|
|
6585
|
-
if (!$dara.isNull(
|
|
6874
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
6875
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6876
|
+
}
|
|
6877
|
+
|
|
6878
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6879
|
+
body: OpenApiUtil.parseToMap(body),
|
|
6880
|
+
});
|
|
6881
|
+
let params = new $OpenApiUtil.Params({
|
|
6882
|
+
action: "RunBookSmartCard",
|
|
6883
|
+
version: "2023-08-01",
|
|
6884
|
+
protocol: "HTTPS",
|
|
6885
|
+
pathname: "/",
|
|
6886
|
+
method: "POST",
|
|
6887
|
+
authType: "AK",
|
|
6888
|
+
style: "RPC",
|
|
6889
|
+
reqBodyType: "formData",
|
|
6890
|
+
bodyType: "json",
|
|
6891
|
+
});
|
|
6892
|
+
return $dara.cast<$_model.RunBookSmartCardResponse>(await this.callApi(params, req, runtime), new $_model.RunBookSmartCardResponse({}));
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
/**
|
|
6896
|
+
* 书籍智能卡片接口
|
|
6897
|
+
*
|
|
6898
|
+
* @param request - RunBookSmartCardRequest
|
|
6899
|
+
* @returns RunBookSmartCardResponse
|
|
6900
|
+
*/
|
|
6901
|
+
async runBookSmartCard(request: $_model.RunBookSmartCardRequest): Promise<$_model.RunBookSmartCardResponse> {
|
|
6902
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
6903
|
+
return await this.runBookSmartCardWithOptions(request, runtime);
|
|
6904
|
+
}
|
|
6905
|
+
|
|
6906
|
+
/**
|
|
6907
|
+
* 客户之声预测
|
|
6908
|
+
*
|
|
6909
|
+
* @param tmpReq - RunCommentGenerationRequest
|
|
6910
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6911
|
+
* @returns RunCommentGenerationResponse
|
|
6912
|
+
*/
|
|
6913
|
+
async *runCommentGenerationWithSSE(tmpReq: $_model.RunCommentGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCommentGenerationResponse, any, unknown> {
|
|
6914
|
+
tmpReq.validate();
|
|
6915
|
+
let request = new $_model.RunCommentGenerationShrinkRequest({ });
|
|
6916
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
6917
|
+
if (!$dara.isNull(tmpReq.lengthRange)) {
|
|
6918
|
+
request.lengthRangeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lengthRange, "LengthRange", "json");
|
|
6919
|
+
}
|
|
6920
|
+
|
|
6921
|
+
if (!$dara.isNull(tmpReq.sentiment)) {
|
|
6922
|
+
request.sentimentShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sentiment, "Sentiment", "json");
|
|
6923
|
+
}
|
|
6924
|
+
|
|
6925
|
+
if (!$dara.isNull(tmpReq.type)) {
|
|
6926
|
+
request.typeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.type, "Type", "json");
|
|
6927
|
+
}
|
|
6928
|
+
|
|
6929
|
+
let body : {[key: string ]: any} = { };
|
|
6930
|
+
if (!$dara.isNull(request.allowEmoji)) {
|
|
6931
|
+
body["AllowEmoji"] = request.allowEmoji;
|
|
6932
|
+
}
|
|
6933
|
+
|
|
6934
|
+
if (!$dara.isNull(request.extraInfo)) {
|
|
6935
|
+
body["ExtraInfo"] = request.extraInfo;
|
|
6936
|
+
}
|
|
6937
|
+
|
|
6938
|
+
if (!$dara.isNull(request.length)) {
|
|
6939
|
+
body["Length"] = request.length;
|
|
6940
|
+
}
|
|
6941
|
+
|
|
6942
|
+
if (!$dara.isNull(request.lengthRangeShrink)) {
|
|
6943
|
+
body["LengthRange"] = request.lengthRangeShrink;
|
|
6944
|
+
}
|
|
6945
|
+
|
|
6946
|
+
if (!$dara.isNull(request.modelId)) {
|
|
6947
|
+
body["ModelId"] = request.modelId;
|
|
6948
|
+
}
|
|
6949
|
+
|
|
6950
|
+
if (!$dara.isNull(request.numComments)) {
|
|
6951
|
+
body["NumComments"] = request.numComments;
|
|
6952
|
+
}
|
|
6953
|
+
|
|
6954
|
+
if (!$dara.isNull(request.sentimentShrink)) {
|
|
6955
|
+
body["Sentiment"] = request.sentimentShrink;
|
|
6956
|
+
}
|
|
6957
|
+
|
|
6958
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
6959
|
+
body["SessionId"] = request.sessionId;
|
|
6960
|
+
}
|
|
6961
|
+
|
|
6962
|
+
if (!$dara.isNull(request.sourceMaterial)) {
|
|
6963
|
+
body["SourceMaterial"] = request.sourceMaterial;
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6966
|
+
if (!$dara.isNull(request.style)) {
|
|
6967
|
+
body["Style"] = request.style;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
if (!$dara.isNull(request.typeShrink)) {
|
|
6971
|
+
body["Type"] = request.typeShrink;
|
|
6972
|
+
}
|
|
6973
|
+
|
|
6974
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
6975
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6976
|
+
}
|
|
6977
|
+
|
|
6978
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6979
|
+
body: OpenApiUtil.parseToMap(body),
|
|
6980
|
+
});
|
|
6981
|
+
let params = new $OpenApiUtil.Params({
|
|
6982
|
+
action: "RunCommentGeneration",
|
|
6983
|
+
version: "2023-08-01",
|
|
6984
|
+
protocol: "HTTPS",
|
|
6985
|
+
pathname: "/",
|
|
6986
|
+
method: "POST",
|
|
6987
|
+
authType: "AK",
|
|
6988
|
+
style: "RPC",
|
|
6989
|
+
reqBodyType: "formData",
|
|
6990
|
+
bodyType: "json",
|
|
6991
|
+
});
|
|
6992
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6993
|
+
|
|
6994
|
+
for await (let resp of sseResp) {
|
|
6995
|
+
let data = JSON.parse(resp.event.data);
|
|
6996
|
+
yield $dara.cast<$_model.RunCommentGenerationResponse>({
|
|
6997
|
+
statusCode: resp.statusCode,
|
|
6998
|
+
headers: resp.headers,
|
|
6999
|
+
body: {
|
|
7000
|
+
...data,
|
|
7001
|
+
RequestId: resp.event.id,
|
|
7002
|
+
Message: resp.event.event,
|
|
7003
|
+
},
|
|
7004
|
+
}, new $_model.RunCommentGenerationResponse({}));
|
|
7005
|
+
}
|
|
7006
|
+
}
|
|
7007
|
+
|
|
7008
|
+
/**
|
|
7009
|
+
* 客户之声预测
|
|
7010
|
+
*
|
|
7011
|
+
* @param tmpReq - RunCommentGenerationRequest
|
|
7012
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
7013
|
+
* @returns RunCommentGenerationResponse
|
|
7014
|
+
*/
|
|
7015
|
+
async runCommentGenerationWithOptions(tmpReq: $_model.RunCommentGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunCommentGenerationResponse> {
|
|
7016
|
+
tmpReq.validate();
|
|
7017
|
+
let request = new $_model.RunCommentGenerationShrinkRequest({ });
|
|
7018
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
7019
|
+
if (!$dara.isNull(tmpReq.lengthRange)) {
|
|
7020
|
+
request.lengthRangeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lengthRange, "LengthRange", "json");
|
|
7021
|
+
}
|
|
7022
|
+
|
|
7023
|
+
if (!$dara.isNull(tmpReq.sentiment)) {
|
|
7024
|
+
request.sentimentShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sentiment, "Sentiment", "json");
|
|
7025
|
+
}
|
|
7026
|
+
|
|
7027
|
+
if (!$dara.isNull(tmpReq.type)) {
|
|
6586
7028
|
request.typeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.type, "Type", "json");
|
|
6587
7029
|
}
|
|
6588
7030
|
|
|
@@ -6663,6 +7105,54 @@ export default class Client extends OpenApi {
|
|
|
6663
7105
|
return await this.runCommentGenerationWithOptions(request, runtime);
|
|
6664
7106
|
}
|
|
6665
7107
|
|
|
7108
|
+
/**
|
|
7109
|
+
* 内容续写
|
|
7110
|
+
*
|
|
7111
|
+
* @param request - RunContinueContentRequest
|
|
7112
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
7113
|
+
* @returns RunContinueContentResponse
|
|
7114
|
+
*/
|
|
7115
|
+
async *runContinueContentWithSSE(request: $_model.RunContinueContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunContinueContentResponse, any, unknown> {
|
|
7116
|
+
request.validate();
|
|
7117
|
+
let body : {[key: string ]: any} = { };
|
|
7118
|
+
if (!$dara.isNull(request.content)) {
|
|
7119
|
+
body["Content"] = request.content;
|
|
7120
|
+
}
|
|
7121
|
+
|
|
7122
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
7123
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
7124
|
+
}
|
|
7125
|
+
|
|
7126
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7127
|
+
body: OpenApiUtil.parseToMap(body),
|
|
7128
|
+
});
|
|
7129
|
+
let params = new $OpenApiUtil.Params({
|
|
7130
|
+
action: "RunContinueContent",
|
|
7131
|
+
version: "2023-08-01",
|
|
7132
|
+
protocol: "HTTPS",
|
|
7133
|
+
pathname: "/",
|
|
7134
|
+
method: "POST",
|
|
7135
|
+
authType: "AK",
|
|
7136
|
+
style: "RPC",
|
|
7137
|
+
reqBodyType: "formData",
|
|
7138
|
+
bodyType: "json",
|
|
7139
|
+
});
|
|
7140
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7141
|
+
|
|
7142
|
+
for await (let resp of sseResp) {
|
|
7143
|
+
let data = JSON.parse(resp.event.data);
|
|
7144
|
+
yield $dara.cast<$_model.RunContinueContentResponse>({
|
|
7145
|
+
statusCode: resp.statusCode,
|
|
7146
|
+
headers: resp.headers,
|
|
7147
|
+
body: {
|
|
7148
|
+
...data,
|
|
7149
|
+
RequestId: resp.event.id,
|
|
7150
|
+
Message: resp.event.event,
|
|
7151
|
+
},
|
|
7152
|
+
}, new $_model.RunContinueContentResponse({}));
|
|
7153
|
+
}
|
|
7154
|
+
}
|
|
7155
|
+
|
|
6666
7156
|
/**
|
|
6667
7157
|
* 内容续写
|
|
6668
7158
|
*
|
|
@@ -6709,6 +7199,74 @@ export default class Client extends OpenApi {
|
|
|
6709
7199
|
return await this.runContinueContentWithOptions(request, runtime);
|
|
6710
7200
|
}
|
|
6711
7201
|
|
|
7202
|
+
/**
|
|
7203
|
+
* 自定义热点话题分析
|
|
7204
|
+
*
|
|
7205
|
+
* @param request - RunCustomHotTopicAnalysisRequest
|
|
7206
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
7207
|
+
* @returns RunCustomHotTopicAnalysisResponse
|
|
7208
|
+
*/
|
|
7209
|
+
async *runCustomHotTopicAnalysisWithSSE(request: $_model.RunCustomHotTopicAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCustomHotTopicAnalysisResponse, any, unknown> {
|
|
7210
|
+
request.validate();
|
|
7211
|
+
let body : {[key: string ]: any} = { };
|
|
7212
|
+
if (!$dara.isNull(request.askUser)) {
|
|
7213
|
+
body["AskUser"] = request.askUser;
|
|
7214
|
+
}
|
|
7215
|
+
|
|
7216
|
+
if (!$dara.isNull(request.forceAnalysisExistsTopic)) {
|
|
7217
|
+
body["ForceAnalysisExistsTopic"] = request.forceAnalysisExistsTopic;
|
|
7218
|
+
}
|
|
7219
|
+
|
|
7220
|
+
if (!$dara.isNull(request.prompt)) {
|
|
7221
|
+
body["Prompt"] = request.prompt;
|
|
7222
|
+
}
|
|
7223
|
+
|
|
7224
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
7225
|
+
body["SessionId"] = request.sessionId;
|
|
7226
|
+
}
|
|
7227
|
+
|
|
7228
|
+
if (!$dara.isNull(request.taskId)) {
|
|
7229
|
+
body["TaskId"] = request.taskId;
|
|
7230
|
+
}
|
|
7231
|
+
|
|
7232
|
+
if (!$dara.isNull(request.userBack)) {
|
|
7233
|
+
body["UserBack"] = request.userBack;
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7236
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
7237
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
7238
|
+
}
|
|
7239
|
+
|
|
7240
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7241
|
+
body: OpenApiUtil.parseToMap(body),
|
|
7242
|
+
});
|
|
7243
|
+
let params = new $OpenApiUtil.Params({
|
|
7244
|
+
action: "RunCustomHotTopicAnalysis",
|
|
7245
|
+
version: "2023-08-01",
|
|
7246
|
+
protocol: "HTTPS",
|
|
7247
|
+
pathname: "/",
|
|
7248
|
+
method: "POST",
|
|
7249
|
+
authType: "AK",
|
|
7250
|
+
style: "RPC",
|
|
7251
|
+
reqBodyType: "formData",
|
|
7252
|
+
bodyType: "json",
|
|
7253
|
+
});
|
|
7254
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7255
|
+
|
|
7256
|
+
for await (let resp of sseResp) {
|
|
7257
|
+
let data = JSON.parse(resp.event.data);
|
|
7258
|
+
yield $dara.cast<$_model.RunCustomHotTopicAnalysisResponse>({
|
|
7259
|
+
statusCode: resp.statusCode,
|
|
7260
|
+
headers: resp.headers,
|
|
7261
|
+
body: {
|
|
7262
|
+
...data,
|
|
7263
|
+
RequestId: resp.event.id,
|
|
7264
|
+
Message: resp.event.event,
|
|
7265
|
+
},
|
|
7266
|
+
}, new $_model.RunCustomHotTopicAnalysisResponse({}));
|
|
7267
|
+
}
|
|
7268
|
+
}
|
|
7269
|
+
|
|
6712
7270
|
/**
|
|
6713
7271
|
* 自定义热点话题分析
|
|
6714
7272
|
*
|
|
@@ -6782,7 +7340,7 @@ export default class Client extends OpenApi {
|
|
|
6782
7340
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
6783
7341
|
* @returns RunCustomHotTopicViewPointAnalysisResponse
|
|
6784
7342
|
*/
|
|
6785
|
-
async
|
|
7343
|
+
async *runCustomHotTopicViewPointAnalysisWithSSE(request: $_model.RunCustomHotTopicViewPointAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCustomHotTopicViewPointAnalysisResponse, any, unknown> {
|
|
6786
7344
|
request.validate();
|
|
6787
7345
|
let body : {[key: string ]: any} = { };
|
|
6788
7346
|
if (!$dara.isNull(request.askUser)) {
|
|
@@ -6839,71 +7397,77 @@ export default class Client extends OpenApi {
|
|
|
6839
7397
|
reqBodyType: "formData",
|
|
6840
7398
|
bodyType: "json",
|
|
6841
7399
|
});
|
|
6842
|
-
|
|
7400
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7401
|
+
|
|
7402
|
+
for await (let resp of sseResp) {
|
|
7403
|
+
let data = JSON.parse(resp.event.data);
|
|
7404
|
+
yield $dara.cast<$_model.RunCustomHotTopicViewPointAnalysisResponse>({
|
|
7405
|
+
statusCode: resp.statusCode,
|
|
7406
|
+
headers: resp.headers,
|
|
7407
|
+
body: {
|
|
7408
|
+
...data,
|
|
7409
|
+
RequestId: resp.event.id,
|
|
7410
|
+
Message: resp.event.event,
|
|
7411
|
+
},
|
|
7412
|
+
}, new $_model.RunCustomHotTopicViewPointAnalysisResponse({}));
|
|
7413
|
+
}
|
|
6843
7414
|
}
|
|
6844
7415
|
|
|
6845
7416
|
/**
|
|
6846
7417
|
* 自定义选题视角分析
|
|
6847
7418
|
*
|
|
6848
7419
|
* @param request - RunCustomHotTopicViewPointAnalysisRequest
|
|
6849
|
-
* @returns RunCustomHotTopicViewPointAnalysisResponse
|
|
6850
|
-
*/
|
|
6851
|
-
async runCustomHotTopicViewPointAnalysis(request: $_model.RunCustomHotTopicViewPointAnalysisRequest): Promise<$_model.RunCustomHotTopicViewPointAnalysisResponse> {
|
|
6852
|
-
let runtime = new $dara.RuntimeOptions({ });
|
|
6853
|
-
return await this.runCustomHotTopicViewPointAnalysisWithOptions(request, runtime);
|
|
6854
|
-
}
|
|
6855
|
-
|
|
6856
|
-
/**
|
|
6857
|
-
* 妙读脑图生成接口
|
|
6858
|
-
*
|
|
6859
|
-
* @param request - RunDocBrainmapRequest
|
|
6860
7420
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
6861
|
-
* @returns
|
|
7421
|
+
* @returns RunCustomHotTopicViewPointAnalysisResponse
|
|
6862
7422
|
*/
|
|
6863
|
-
async
|
|
7423
|
+
async runCustomHotTopicViewPointAnalysisWithOptions(request: $_model.RunCustomHotTopicViewPointAnalysisRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunCustomHotTopicViewPointAnalysisResponse> {
|
|
6864
7424
|
request.validate();
|
|
6865
7425
|
let body : {[key: string ]: any} = { };
|
|
6866
|
-
if (!$dara.isNull(request.
|
|
6867
|
-
body["
|
|
7426
|
+
if (!$dara.isNull(request.askUser)) {
|
|
7427
|
+
body["AskUser"] = request.askUser;
|
|
6868
7428
|
}
|
|
6869
7429
|
|
|
6870
|
-
if (!$dara.isNull(request.
|
|
6871
|
-
body["
|
|
7430
|
+
if (!$dara.isNull(request.prompt)) {
|
|
7431
|
+
body["Prompt"] = request.prompt;
|
|
6872
7432
|
}
|
|
6873
7433
|
|
|
6874
|
-
if (!$dara.isNull(request.
|
|
6875
|
-
body["
|
|
7434
|
+
if (!$dara.isNull(request.searchQuery)) {
|
|
7435
|
+
body["SearchQuery"] = request.searchQuery;
|
|
6876
7436
|
}
|
|
6877
7437
|
|
|
6878
|
-
if (!$dara.isNull(request.
|
|
6879
|
-
body["
|
|
7438
|
+
if (!$dara.isNull(request.skipAskUser)) {
|
|
7439
|
+
body["SkipAskUser"] = request.skipAskUser;
|
|
6880
7440
|
}
|
|
6881
7441
|
|
|
6882
|
-
if (!$dara.isNull(request.
|
|
6883
|
-
body["
|
|
7442
|
+
if (!$dara.isNull(request.topic)) {
|
|
7443
|
+
body["Topic"] = request.topic;
|
|
6884
7444
|
}
|
|
6885
7445
|
|
|
6886
|
-
if (!$dara.isNull(request.
|
|
6887
|
-
body["
|
|
7446
|
+
if (!$dara.isNull(request.topicId)) {
|
|
7447
|
+
body["TopicId"] = request.topicId;
|
|
6888
7448
|
}
|
|
6889
7449
|
|
|
6890
|
-
if (!$dara.isNull(request.
|
|
6891
|
-
body["
|
|
7450
|
+
if (!$dara.isNull(request.topicSource)) {
|
|
7451
|
+
body["TopicSource"] = request.topicSource;
|
|
6892
7452
|
}
|
|
6893
7453
|
|
|
6894
|
-
if (!$dara.isNull(request.
|
|
6895
|
-
body["
|
|
7454
|
+
if (!$dara.isNull(request.topicVersion)) {
|
|
7455
|
+
body["TopicVersion"] = request.topicVersion;
|
|
6896
7456
|
}
|
|
6897
7457
|
|
|
6898
|
-
if (!$dara.isNull(request.
|
|
6899
|
-
body["
|
|
7458
|
+
if (!$dara.isNull(request.userBack)) {
|
|
7459
|
+
body["UserBack"] = request.userBack;
|
|
7460
|
+
}
|
|
7461
|
+
|
|
7462
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
7463
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
6900
7464
|
}
|
|
6901
7465
|
|
|
6902
7466
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
6903
7467
|
body: OpenApiUtil.parseToMap(body),
|
|
6904
7468
|
});
|
|
6905
7469
|
let params = new $OpenApiUtil.Params({
|
|
6906
|
-
action: "
|
|
7470
|
+
action: "RunCustomHotTopicViewPointAnalysis",
|
|
6907
7471
|
version: "2023-08-01",
|
|
6908
7472
|
protocol: "HTTPS",
|
|
6909
7473
|
pathname: "/",
|
|
@@ -6913,28 +7477,28 @@ export default class Client extends OpenApi {
|
|
|
6913
7477
|
reqBodyType: "formData",
|
|
6914
7478
|
bodyType: "json",
|
|
6915
7479
|
});
|
|
6916
|
-
return $dara.cast<$_model.
|
|
7480
|
+
return $dara.cast<$_model.RunCustomHotTopicViewPointAnalysisResponse>(await this.callApi(params, req, runtime), new $_model.RunCustomHotTopicViewPointAnalysisResponse({}));
|
|
6917
7481
|
}
|
|
6918
7482
|
|
|
6919
7483
|
/**
|
|
6920
|
-
*
|
|
7484
|
+
* 自定义选题视角分析
|
|
6921
7485
|
*
|
|
6922
|
-
* @param request -
|
|
6923
|
-
* @returns
|
|
7486
|
+
* @param request - RunCustomHotTopicViewPointAnalysisRequest
|
|
7487
|
+
* @returns RunCustomHotTopicViewPointAnalysisResponse
|
|
6924
7488
|
*/
|
|
6925
|
-
async
|
|
7489
|
+
async runCustomHotTopicViewPointAnalysis(request: $_model.RunCustomHotTopicViewPointAnalysisRequest): Promise<$_model.RunCustomHotTopicViewPointAnalysisResponse> {
|
|
6926
7490
|
let runtime = new $dara.RuntimeOptions({ });
|
|
6927
|
-
return await this.
|
|
7491
|
+
return await this.runCustomHotTopicViewPointAnalysisWithOptions(request, runtime);
|
|
6928
7492
|
}
|
|
6929
7493
|
|
|
6930
7494
|
/**
|
|
6931
|
-
*
|
|
7495
|
+
* 妙读脑图生成接口
|
|
6932
7496
|
*
|
|
6933
|
-
* @param request -
|
|
7497
|
+
* @param request - RunDocBrainmapRequest
|
|
6934
7498
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
6935
|
-
* @returns
|
|
7499
|
+
* @returns RunDocBrainmapResponse
|
|
6936
7500
|
*/
|
|
6937
|
-
async
|
|
7501
|
+
async *runDocBrainmapWithSSE(request: $_model.RunDocBrainmapRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocBrainmapResponse, any, unknown> {
|
|
6938
7502
|
request.validate();
|
|
6939
7503
|
let body : {[key: string ]: any} = { };
|
|
6940
7504
|
if (!$dara.isNull(request.cleanCache)) {
|
|
@@ -6945,24 +7509,24 @@ export default class Client extends OpenApi {
|
|
|
6945
7509
|
body["DocId"] = request.docId;
|
|
6946
7510
|
}
|
|
6947
7511
|
|
|
6948
|
-
if (!$dara.isNull(request.
|
|
6949
|
-
body["
|
|
7512
|
+
if (!$dara.isNull(request.modelName)) {
|
|
7513
|
+
body["ModelName"] = request.modelName;
|
|
6950
7514
|
}
|
|
6951
7515
|
|
|
6952
|
-
if (!$dara.isNull(request.
|
|
6953
|
-
body["
|
|
7516
|
+
if (!$dara.isNull(request.nodeNumber)) {
|
|
7517
|
+
body["NodeNumber"] = request.nodeNumber;
|
|
6954
7518
|
}
|
|
6955
7519
|
|
|
6956
|
-
if (!$dara.isNull(request.
|
|
6957
|
-
body["
|
|
7520
|
+
if (!$dara.isNull(request.prompt)) {
|
|
7521
|
+
body["Prompt"] = request.prompt;
|
|
6958
7522
|
}
|
|
6959
7523
|
|
|
6960
7524
|
if (!$dara.isNull(request.sessionId)) {
|
|
6961
7525
|
body["SessionId"] = request.sessionId;
|
|
6962
7526
|
}
|
|
6963
7527
|
|
|
6964
|
-
if (!$dara.isNull(request.
|
|
6965
|
-
body["
|
|
7528
|
+
if (!$dara.isNull(request.wordNumber)) {
|
|
7529
|
+
body["WordNumber"] = request.wordNumber;
|
|
6966
7530
|
}
|
|
6967
7531
|
|
|
6968
7532
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -6977,7 +7541,7 @@ export default class Client extends OpenApi {
|
|
|
6977
7541
|
body: OpenApiUtil.parseToMap(body),
|
|
6978
7542
|
});
|
|
6979
7543
|
let params = new $OpenApiUtil.Params({
|
|
6980
|
-
action: "
|
|
7544
|
+
action: "RunDocBrainmap",
|
|
6981
7545
|
version: "2023-08-01",
|
|
6982
7546
|
protocol: "HTTPS",
|
|
6983
7547
|
pathname: "/",
|
|
@@ -6987,85 +7551,73 @@ export default class Client extends OpenApi {
|
|
|
6987
7551
|
reqBodyType: "formData",
|
|
6988
7552
|
bodyType: "json",
|
|
6989
7553
|
});
|
|
6990
|
-
|
|
6991
|
-
}
|
|
7554
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
6992
7555
|
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7556
|
+
for await (let resp of sseResp) {
|
|
7557
|
+
let data = JSON.parse(resp.event.data);
|
|
7558
|
+
yield $dara.cast<$_model.RunDocBrainmapResponse>({
|
|
7559
|
+
statusCode: resp.statusCode,
|
|
7560
|
+
headers: resp.headers,
|
|
7561
|
+
body: {
|
|
7562
|
+
...data,
|
|
7563
|
+
RequestId: resp.event.id,
|
|
7564
|
+
Message: resp.event.event,
|
|
7565
|
+
},
|
|
7566
|
+
}, new $_model.RunDocBrainmapResponse({}));
|
|
7567
|
+
}
|
|
7002
7568
|
}
|
|
7003
7569
|
|
|
7004
7570
|
/**
|
|
7005
|
-
*
|
|
7571
|
+
* 妙读脑图生成接口
|
|
7006
7572
|
*
|
|
7007
|
-
* @param
|
|
7573
|
+
* @param request - RunDocBrainmapRequest
|
|
7008
7574
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7009
|
-
* @returns
|
|
7575
|
+
* @returns RunDocBrainmapResponse
|
|
7010
7576
|
*/
|
|
7011
|
-
async
|
|
7012
|
-
|
|
7013
|
-
let request = new $_model.RunDocQaShrinkRequest({ });
|
|
7014
|
-
OpenApiUtil.convert(tmpReq, request);
|
|
7015
|
-
if (!$dara.isNull(tmpReq.categoryIds)) {
|
|
7016
|
-
request.categoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.categoryIds, "CategoryIds", "json");
|
|
7017
|
-
}
|
|
7018
|
-
|
|
7019
|
-
if (!$dara.isNull(tmpReq.conversationContexts)) {
|
|
7020
|
-
request.conversationContextsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conversationContexts, "ConversationContexts", "json");
|
|
7021
|
-
}
|
|
7022
|
-
|
|
7023
|
-
if (!$dara.isNull(tmpReq.docIds)) {
|
|
7024
|
-
request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
|
|
7025
|
-
}
|
|
7026
|
-
|
|
7577
|
+
async runDocBrainmapWithOptions(request: $_model.RunDocBrainmapRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocBrainmapResponse> {
|
|
7578
|
+
request.validate();
|
|
7027
7579
|
let body : {[key: string ]: any} = { };
|
|
7028
|
-
if (!$dara.isNull(request.
|
|
7029
|
-
body["
|
|
7030
|
-
}
|
|
7031
|
-
|
|
7032
|
-
if (!$dara.isNull(request.conversationContextsShrink)) {
|
|
7033
|
-
body["ConversationContexts"] = request.conversationContextsShrink;
|
|
7580
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
7581
|
+
body["CleanCache"] = request.cleanCache;
|
|
7034
7582
|
}
|
|
7035
7583
|
|
|
7036
|
-
if (!$dara.isNull(request.
|
|
7037
|
-
body["
|
|
7584
|
+
if (!$dara.isNull(request.docId)) {
|
|
7585
|
+
body["DocId"] = request.docId;
|
|
7038
7586
|
}
|
|
7039
7587
|
|
|
7040
7588
|
if (!$dara.isNull(request.modelName)) {
|
|
7041
7589
|
body["ModelName"] = request.modelName;
|
|
7042
7590
|
}
|
|
7043
7591
|
|
|
7044
|
-
if (!$dara.isNull(request.
|
|
7045
|
-
body["
|
|
7046
|
-
}
|
|
7047
|
-
|
|
7048
|
-
if (!$dara.isNull(request.referenceContent)) {
|
|
7049
|
-
body["ReferenceContent"] = request.referenceContent;
|
|
7592
|
+
if (!$dara.isNull(request.nodeNumber)) {
|
|
7593
|
+
body["NodeNumber"] = request.nodeNumber;
|
|
7050
7594
|
}
|
|
7051
7595
|
|
|
7052
|
-
if (!$dara.isNull(request.
|
|
7053
|
-
body["
|
|
7596
|
+
if (!$dara.isNull(request.prompt)) {
|
|
7597
|
+
body["Prompt"] = request.prompt;
|
|
7054
7598
|
}
|
|
7055
7599
|
|
|
7056
7600
|
if (!$dara.isNull(request.sessionId)) {
|
|
7057
7601
|
body["SessionId"] = request.sessionId;
|
|
7058
7602
|
}
|
|
7059
7603
|
|
|
7604
|
+
if (!$dara.isNull(request.wordNumber)) {
|
|
7605
|
+
body["WordNumber"] = request.wordNumber;
|
|
7606
|
+
}
|
|
7607
|
+
|
|
7060
7608
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7061
7609
|
body["WorkspaceId"] = request.workspaceId;
|
|
7062
7610
|
}
|
|
7063
7611
|
|
|
7612
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
7613
|
+
body["referenceContent"] = request.referenceContent;
|
|
7614
|
+
}
|
|
7615
|
+
|
|
7064
7616
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7065
7617
|
body: OpenApiUtil.parseToMap(body),
|
|
7066
7618
|
});
|
|
7067
7619
|
let params = new $OpenApiUtil.Params({
|
|
7068
|
-
action: "
|
|
7620
|
+
action: "RunDocBrainmap",
|
|
7069
7621
|
version: "2023-08-01",
|
|
7070
7622
|
protocol: "HTTPS",
|
|
7071
7623
|
pathname: "/",
|
|
@@ -7075,55 +7627,71 @@ export default class Client extends OpenApi {
|
|
|
7075
7627
|
reqBodyType: "formData",
|
|
7076
7628
|
bodyType: "json",
|
|
7077
7629
|
});
|
|
7078
|
-
return $dara.cast<$_model.
|
|
7630
|
+
return $dara.cast<$_model.RunDocBrainmapResponse>(await this.callApi(params, req, runtime), new $_model.RunDocBrainmapResponse({}));
|
|
7079
7631
|
}
|
|
7080
7632
|
|
|
7081
7633
|
/**
|
|
7082
|
-
*
|
|
7634
|
+
* 妙读脑图生成接口
|
|
7083
7635
|
*
|
|
7084
|
-
* @param request -
|
|
7085
|
-
* @returns
|
|
7636
|
+
* @param request - RunDocBrainmapRequest
|
|
7637
|
+
* @returns RunDocBrainmapResponse
|
|
7086
7638
|
*/
|
|
7087
|
-
async
|
|
7639
|
+
async runDocBrainmap(request: $_model.RunDocBrainmapRequest): Promise<$_model.RunDocBrainmapResponse> {
|
|
7088
7640
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7089
|
-
return await this.
|
|
7641
|
+
return await this.runDocBrainmapWithOptions(request, runtime);
|
|
7090
7642
|
}
|
|
7091
7643
|
|
|
7092
7644
|
/**
|
|
7093
|
-
*
|
|
7645
|
+
* 妙读文档导读接口
|
|
7094
7646
|
*
|
|
7095
|
-
* @param request -
|
|
7647
|
+
* @param request - RunDocIntroductionRequest
|
|
7096
7648
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7097
|
-
* @returns
|
|
7649
|
+
* @returns RunDocIntroductionResponse
|
|
7098
7650
|
*/
|
|
7099
|
-
async
|
|
7651
|
+
async *runDocIntroductionWithSSE(request: $_model.RunDocIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocIntroductionResponse, any, unknown> {
|
|
7100
7652
|
request.validate();
|
|
7101
7653
|
let body : {[key: string ]: any} = { };
|
|
7654
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
7655
|
+
body["CleanCache"] = request.cleanCache;
|
|
7656
|
+
}
|
|
7657
|
+
|
|
7102
7658
|
if (!$dara.isNull(request.docId)) {
|
|
7103
7659
|
body["DocId"] = request.docId;
|
|
7104
7660
|
}
|
|
7105
7661
|
|
|
7106
|
-
if (!$dara.isNull(request.
|
|
7107
|
-
body["
|
|
7662
|
+
if (!$dara.isNull(request.introductionPrompt)) {
|
|
7663
|
+
body["IntroductionPrompt"] = request.introductionPrompt;
|
|
7108
7664
|
}
|
|
7109
7665
|
|
|
7110
|
-
if (!$dara.isNull(request.
|
|
7111
|
-
body["
|
|
7666
|
+
if (!$dara.isNull(request.keyPointPrompt)) {
|
|
7667
|
+
body["KeyPointPrompt"] = request.keyPointPrompt;
|
|
7668
|
+
}
|
|
7669
|
+
|
|
7670
|
+
if (!$dara.isNull(request.modelName)) {
|
|
7671
|
+
body["ModelName"] = request.modelName;
|
|
7112
7672
|
}
|
|
7113
7673
|
|
|
7114
7674
|
if (!$dara.isNull(request.sessionId)) {
|
|
7115
7675
|
body["SessionId"] = request.sessionId;
|
|
7116
7676
|
}
|
|
7117
7677
|
|
|
7678
|
+
if (!$dara.isNull(request.summaryPrompt)) {
|
|
7679
|
+
body["SummaryPrompt"] = request.summaryPrompt;
|
|
7680
|
+
}
|
|
7681
|
+
|
|
7118
7682
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7119
7683
|
body["WorkspaceId"] = request.workspaceId;
|
|
7120
7684
|
}
|
|
7121
7685
|
|
|
7686
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
7687
|
+
body["referenceContent"] = request.referenceContent;
|
|
7688
|
+
}
|
|
7689
|
+
|
|
7122
7690
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7123
7691
|
body: OpenApiUtil.parseToMap(body),
|
|
7124
7692
|
});
|
|
7125
7693
|
let params = new $OpenApiUtil.Params({
|
|
7126
|
-
action: "
|
|
7694
|
+
action: "RunDocIntroduction",
|
|
7127
7695
|
version: "2023-08-01",
|
|
7128
7696
|
protocol: "HTTPS",
|
|
7129
7697
|
pathname: "/",
|
|
@@ -7133,28 +7701,30 @@ export default class Client extends OpenApi {
|
|
|
7133
7701
|
reqBodyType: "formData",
|
|
7134
7702
|
bodyType: "json",
|
|
7135
7703
|
});
|
|
7136
|
-
|
|
7137
|
-
}
|
|
7704
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7138
7705
|
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7706
|
+
for await (let resp of sseResp) {
|
|
7707
|
+
let data = JSON.parse(resp.event.data);
|
|
7708
|
+
yield $dara.cast<$_model.RunDocIntroductionResponse>({
|
|
7709
|
+
statusCode: resp.statusCode,
|
|
7710
|
+
headers: resp.headers,
|
|
7711
|
+
body: {
|
|
7712
|
+
...data,
|
|
7713
|
+
RequestId: resp.event.id,
|
|
7714
|
+
Message: resp.event.event,
|
|
7715
|
+
},
|
|
7716
|
+
}, new $_model.RunDocIntroductionResponse({}));
|
|
7717
|
+
}
|
|
7148
7718
|
}
|
|
7149
7719
|
|
|
7150
7720
|
/**
|
|
7151
|
-
*
|
|
7721
|
+
* 妙读文档导读接口
|
|
7152
7722
|
*
|
|
7153
|
-
* @param request -
|
|
7723
|
+
* @param request - RunDocIntroductionRequest
|
|
7154
7724
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7155
|
-
* @returns
|
|
7725
|
+
* @returns RunDocIntroductionResponse
|
|
7156
7726
|
*/
|
|
7157
|
-
async
|
|
7727
|
+
async runDocIntroductionWithOptions(request: $_model.RunDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocIntroductionResponse> {
|
|
7158
7728
|
request.validate();
|
|
7159
7729
|
let body : {[key: string ]: any} = { };
|
|
7160
7730
|
if (!$dara.isNull(request.cleanCache)) {
|
|
@@ -7165,31 +7735,39 @@ export default class Client extends OpenApi {
|
|
|
7165
7735
|
body["DocId"] = request.docId;
|
|
7166
7736
|
}
|
|
7167
7737
|
|
|
7168
|
-
if (!$dara.isNull(request.
|
|
7169
|
-
body["
|
|
7738
|
+
if (!$dara.isNull(request.introductionPrompt)) {
|
|
7739
|
+
body["IntroductionPrompt"] = request.introductionPrompt;
|
|
7170
7740
|
}
|
|
7171
7741
|
|
|
7172
|
-
if (!$dara.isNull(request.
|
|
7173
|
-
body["
|
|
7742
|
+
if (!$dara.isNull(request.keyPointPrompt)) {
|
|
7743
|
+
body["KeyPointPrompt"] = request.keyPointPrompt;
|
|
7174
7744
|
}
|
|
7175
7745
|
|
|
7176
|
-
if (!$dara.isNull(request.
|
|
7177
|
-
body["
|
|
7746
|
+
if (!$dara.isNull(request.modelName)) {
|
|
7747
|
+
body["ModelName"] = request.modelName;
|
|
7178
7748
|
}
|
|
7179
7749
|
|
|
7180
7750
|
if (!$dara.isNull(request.sessionId)) {
|
|
7181
7751
|
body["SessionId"] = request.sessionId;
|
|
7182
7752
|
}
|
|
7183
7753
|
|
|
7754
|
+
if (!$dara.isNull(request.summaryPrompt)) {
|
|
7755
|
+
body["SummaryPrompt"] = request.summaryPrompt;
|
|
7756
|
+
}
|
|
7757
|
+
|
|
7184
7758
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7185
7759
|
body["WorkspaceId"] = request.workspaceId;
|
|
7186
7760
|
}
|
|
7187
7761
|
|
|
7762
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
7763
|
+
body["referenceContent"] = request.referenceContent;
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7188
7766
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7189
7767
|
body: OpenApiUtil.parseToMap(body),
|
|
7190
7768
|
});
|
|
7191
7769
|
let params = new $OpenApiUtil.Params({
|
|
7192
|
-
action: "
|
|
7770
|
+
action: "RunDocIntroduction",
|
|
7193
7771
|
version: "2023-08-01",
|
|
7194
7772
|
protocol: "HTTPS",
|
|
7195
7773
|
pathname: "/",
|
|
@@ -7199,52 +7777,74 @@ export default class Client extends OpenApi {
|
|
|
7199
7777
|
reqBodyType: "formData",
|
|
7200
7778
|
bodyType: "json",
|
|
7201
7779
|
});
|
|
7202
|
-
return $dara.cast<$_model.
|
|
7780
|
+
return $dara.cast<$_model.RunDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunDocIntroductionResponse({}));
|
|
7203
7781
|
}
|
|
7204
7782
|
|
|
7205
7783
|
/**
|
|
7206
|
-
*
|
|
7784
|
+
* 妙读文档导读接口
|
|
7207
7785
|
*
|
|
7208
|
-
* @param request -
|
|
7209
|
-
* @returns
|
|
7786
|
+
* @param request - RunDocIntroductionRequest
|
|
7787
|
+
* @returns RunDocIntroductionResponse
|
|
7210
7788
|
*/
|
|
7211
|
-
async
|
|
7789
|
+
async runDocIntroduction(request: $_model.RunDocIntroductionRequest): Promise<$_model.RunDocIntroductionResponse> {
|
|
7212
7790
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7213
|
-
return await this.
|
|
7791
|
+
return await this.runDocIntroductionWithOptions(request, runtime);
|
|
7214
7792
|
}
|
|
7215
7793
|
|
|
7216
7794
|
/**
|
|
7217
|
-
*
|
|
7795
|
+
* 妙读问答接口
|
|
7218
7796
|
*
|
|
7219
|
-
* @param
|
|
7797
|
+
* @param tmpReq - RunDocQaRequest
|
|
7220
7798
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7221
|
-
* @returns
|
|
7799
|
+
* @returns RunDocQaResponse
|
|
7222
7800
|
*/
|
|
7223
|
-
async
|
|
7224
|
-
|
|
7225
|
-
let
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7801
|
+
async *runDocQaWithSSE(tmpReq: $_model.RunDocQaRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocQaResponse, any, unknown> {
|
|
7802
|
+
tmpReq.validate();
|
|
7803
|
+
let request = new $_model.RunDocQaShrinkRequest({ });
|
|
7804
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
7805
|
+
if (!$dara.isNull(tmpReq.categoryIds)) {
|
|
7806
|
+
request.categoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.categoryIds, "CategoryIds", "json");
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
if (!$dara.isNull(tmpReq.conversationContexts)) {
|
|
7810
|
+
request.conversationContextsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conversationContexts, "ConversationContexts", "json");
|
|
7811
|
+
}
|
|
7812
|
+
|
|
7813
|
+
if (!$dara.isNull(tmpReq.docIds)) {
|
|
7814
|
+
request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
|
|
7815
|
+
}
|
|
7816
|
+
|
|
7817
|
+
let body : {[key: string ]: any} = { };
|
|
7818
|
+
if (!$dara.isNull(request.categoryIdsShrink)) {
|
|
7819
|
+
body["CategoryIds"] = request.categoryIdsShrink;
|
|
7820
|
+
}
|
|
7821
|
+
|
|
7822
|
+
if (!$dara.isNull(request.conversationContextsShrink)) {
|
|
7823
|
+
body["ConversationContexts"] = request.conversationContextsShrink;
|
|
7824
|
+
}
|
|
7825
|
+
|
|
7826
|
+
if (!$dara.isNull(request.docIdsShrink)) {
|
|
7827
|
+
body["DocIds"] = request.docIdsShrink;
|
|
7232
7828
|
}
|
|
7233
7829
|
|
|
7234
7830
|
if (!$dara.isNull(request.modelName)) {
|
|
7235
7831
|
body["ModelName"] = request.modelName;
|
|
7236
7832
|
}
|
|
7237
7833
|
|
|
7238
|
-
if (!$dara.isNull(request.
|
|
7239
|
-
body["
|
|
7834
|
+
if (!$dara.isNull(request.query)) {
|
|
7835
|
+
body["Query"] = request.query;
|
|
7240
7836
|
}
|
|
7241
7837
|
|
|
7242
|
-
if (!$dara.isNull(request.
|
|
7243
|
-
body["
|
|
7838
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
7839
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
7244
7840
|
}
|
|
7245
7841
|
|
|
7246
|
-
if (!$dara.isNull(request.
|
|
7247
|
-
body["
|
|
7842
|
+
if (!$dara.isNull(request.searchSource)) {
|
|
7843
|
+
body["SearchSource"] = request.searchSource;
|
|
7844
|
+
}
|
|
7845
|
+
|
|
7846
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
7847
|
+
body["SessionId"] = request.sessionId;
|
|
7248
7848
|
}
|
|
7249
7849
|
|
|
7250
7850
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -7255,7 +7855,7 @@ export default class Client extends OpenApi {
|
|
|
7255
7855
|
body: OpenApiUtil.parseToMap(body),
|
|
7256
7856
|
});
|
|
7257
7857
|
let params = new $OpenApiUtil.Params({
|
|
7258
|
-
action: "
|
|
7858
|
+
action: "RunDocQa",
|
|
7259
7859
|
version: "2023-08-01",
|
|
7260
7860
|
protocol: "HTTPS",
|
|
7261
7861
|
pathname: "/",
|
|
@@ -7265,71 +7865,87 @@ export default class Client extends OpenApi {
|
|
|
7265
7865
|
reqBodyType: "formData",
|
|
7266
7866
|
bodyType: "json",
|
|
7267
7867
|
});
|
|
7268
|
-
|
|
7269
|
-
}
|
|
7868
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7270
7869
|
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7870
|
+
for await (let resp of sseResp) {
|
|
7871
|
+
let data = JSON.parse(resp.event.data);
|
|
7872
|
+
yield $dara.cast<$_model.RunDocQaResponse>({
|
|
7873
|
+
statusCode: resp.statusCode,
|
|
7874
|
+
headers: resp.headers,
|
|
7875
|
+
body: {
|
|
7876
|
+
...data,
|
|
7877
|
+
RequestId: resp.event.id,
|
|
7878
|
+
Message: resp.event.event,
|
|
7879
|
+
},
|
|
7880
|
+
}, new $_model.RunDocQaResponse({}));
|
|
7881
|
+
}
|
|
7280
7882
|
}
|
|
7281
7883
|
|
|
7282
7884
|
/**
|
|
7283
|
-
*
|
|
7885
|
+
* 妙读问答接口
|
|
7284
7886
|
*
|
|
7285
|
-
* @param
|
|
7887
|
+
* @param tmpReq - RunDocQaRequest
|
|
7286
7888
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7287
|
-
* @returns
|
|
7889
|
+
* @returns RunDocQaResponse
|
|
7288
7890
|
*/
|
|
7289
|
-
async
|
|
7290
|
-
|
|
7891
|
+
async runDocQaWithOptions(tmpReq: $_model.RunDocQaRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocQaResponse> {
|
|
7892
|
+
tmpReq.validate();
|
|
7893
|
+
let request = new $_model.RunDocQaShrinkRequest({ });
|
|
7894
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
7895
|
+
if (!$dara.isNull(tmpReq.categoryIds)) {
|
|
7896
|
+
request.categoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.categoryIds, "CategoryIds", "json");
|
|
7897
|
+
}
|
|
7898
|
+
|
|
7899
|
+
if (!$dara.isNull(tmpReq.conversationContexts)) {
|
|
7900
|
+
request.conversationContextsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conversationContexts, "ConversationContexts", "json");
|
|
7901
|
+
}
|
|
7902
|
+
|
|
7903
|
+
if (!$dara.isNull(tmpReq.docIds)) {
|
|
7904
|
+
request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
|
|
7905
|
+
}
|
|
7906
|
+
|
|
7291
7907
|
let body : {[key: string ]: any} = { };
|
|
7292
|
-
if (!$dara.isNull(request.
|
|
7293
|
-
body["
|
|
7908
|
+
if (!$dara.isNull(request.categoryIdsShrink)) {
|
|
7909
|
+
body["CategoryIds"] = request.categoryIdsShrink;
|
|
7294
7910
|
}
|
|
7295
7911
|
|
|
7296
|
-
if (!$dara.isNull(request.
|
|
7297
|
-
body["
|
|
7912
|
+
if (!$dara.isNull(request.conversationContextsShrink)) {
|
|
7913
|
+
body["ConversationContexts"] = request.conversationContextsShrink;
|
|
7298
7914
|
}
|
|
7299
7915
|
|
|
7300
|
-
if (!$dara.isNull(request.
|
|
7301
|
-
body["
|
|
7916
|
+
if (!$dara.isNull(request.docIdsShrink)) {
|
|
7917
|
+
body["DocIds"] = request.docIdsShrink;
|
|
7302
7918
|
}
|
|
7303
7919
|
|
|
7304
|
-
if (!$dara.isNull(request.
|
|
7305
|
-
body["
|
|
7920
|
+
if (!$dara.isNull(request.modelName)) {
|
|
7921
|
+
body["ModelName"] = request.modelName;
|
|
7306
7922
|
}
|
|
7307
7923
|
|
|
7308
|
-
if (!$dara.isNull(request.
|
|
7309
|
-
body["
|
|
7924
|
+
if (!$dara.isNull(request.query)) {
|
|
7925
|
+
body["Query"] = request.query;
|
|
7310
7926
|
}
|
|
7311
7927
|
|
|
7312
|
-
if (!$dara.isNull(request.
|
|
7313
|
-
body["
|
|
7928
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
7929
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
7314
7930
|
}
|
|
7315
7931
|
|
|
7316
|
-
if (!$dara.isNull(request.
|
|
7317
|
-
body["
|
|
7932
|
+
if (!$dara.isNull(request.searchSource)) {
|
|
7933
|
+
body["SearchSource"] = request.searchSource;
|
|
7318
7934
|
}
|
|
7319
7935
|
|
|
7320
|
-
if (!$dara.isNull(request.
|
|
7321
|
-
body["
|
|
7936
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
7937
|
+
body["SessionId"] = request.sessionId;
|
|
7322
7938
|
}
|
|
7323
7939
|
|
|
7324
|
-
if (!$dara.isNull(request.
|
|
7325
|
-
body["
|
|
7940
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
7941
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
7326
7942
|
}
|
|
7327
7943
|
|
|
7328
7944
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7329
7945
|
body: OpenApiUtil.parseToMap(body),
|
|
7330
7946
|
});
|
|
7331
7947
|
let params = new $OpenApiUtil.Params({
|
|
7332
|
-
action: "
|
|
7948
|
+
action: "RunDocQa",
|
|
7333
7949
|
version: "2023-08-01",
|
|
7334
7950
|
protocol: "HTTPS",
|
|
7335
7951
|
pathname: "/",
|
|
@@ -7339,38 +7955,46 @@ export default class Client extends OpenApi {
|
|
|
7339
7955
|
reqBodyType: "formData",
|
|
7340
7956
|
bodyType: "json",
|
|
7341
7957
|
});
|
|
7342
|
-
return $dara.cast<$_model.
|
|
7958
|
+
return $dara.cast<$_model.RunDocQaResponse>(await this.callApi(params, req, runtime), new $_model.RunDocQaResponse({}));
|
|
7343
7959
|
}
|
|
7344
7960
|
|
|
7345
7961
|
/**
|
|
7346
|
-
*
|
|
7962
|
+
* 妙读问答接口
|
|
7347
7963
|
*
|
|
7348
|
-
* @param request -
|
|
7349
|
-
* @returns
|
|
7964
|
+
* @param request - RunDocQaRequest
|
|
7965
|
+
* @returns RunDocQaResponse
|
|
7350
7966
|
*/
|
|
7351
|
-
async
|
|
7967
|
+
async runDocQa(request: $_model.RunDocQaRequest): Promise<$_model.RunDocQaResponse> {
|
|
7352
7968
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7353
|
-
return await this.
|
|
7969
|
+
return await this.runDocQaWithOptions(request, runtime);
|
|
7354
7970
|
}
|
|
7355
7971
|
|
|
7356
7972
|
/**
|
|
7357
|
-
*
|
|
7973
|
+
* 文档智能卡片接口
|
|
7358
7974
|
*
|
|
7359
|
-
* @param request -
|
|
7975
|
+
* @param request - RunDocSmartCardRequest
|
|
7360
7976
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7361
|
-
* @returns
|
|
7977
|
+
* @returns RunDocSmartCardResponse
|
|
7362
7978
|
*/
|
|
7363
|
-
async
|
|
7979
|
+
async *runDocSmartCardWithSSE(request: $_model.RunDocSmartCardRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocSmartCardResponse, any, unknown> {
|
|
7364
7980
|
request.validate();
|
|
7365
7981
|
let body : {[key: string ]: any} = { };
|
|
7366
|
-
if (!$dara.isNull(request.
|
|
7367
|
-
body["
|
|
7982
|
+
if (!$dara.isNull(request.docId)) {
|
|
7983
|
+
body["DocId"] = request.docId;
|
|
7984
|
+
}
|
|
7985
|
+
|
|
7986
|
+
if (!$dara.isNull(request.modelName)) {
|
|
7987
|
+
body["ModelName"] = request.modelName;
|
|
7368
7988
|
}
|
|
7369
7989
|
|
|
7370
7990
|
if (!$dara.isNull(request.prompt)) {
|
|
7371
7991
|
body["Prompt"] = request.prompt;
|
|
7372
7992
|
}
|
|
7373
7993
|
|
|
7994
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
7995
|
+
body["SessionId"] = request.sessionId;
|
|
7996
|
+
}
|
|
7997
|
+
|
|
7374
7998
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7375
7999
|
body["WorkspaceId"] = request.workspaceId;
|
|
7376
8000
|
}
|
|
@@ -7379,7 +8003,7 @@ export default class Client extends OpenApi {
|
|
|
7379
8003
|
body: OpenApiUtil.parseToMap(body),
|
|
7380
8004
|
});
|
|
7381
8005
|
let params = new $OpenApiUtil.Params({
|
|
7382
|
-
action: "
|
|
8006
|
+
action: "RunDocSmartCard",
|
|
7383
8007
|
version: "2023-08-01",
|
|
7384
8008
|
protocol: "HTTPS",
|
|
7385
8009
|
pathname: "/",
|
|
@@ -7389,28 +8013,30 @@ export default class Client extends OpenApi {
|
|
|
7389
8013
|
reqBodyType: "formData",
|
|
7390
8014
|
bodyType: "json",
|
|
7391
8015
|
});
|
|
7392
|
-
|
|
7393
|
-
}
|
|
8016
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7394
8017
|
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
8018
|
+
for await (let resp of sseResp) {
|
|
8019
|
+
let data = JSON.parse(resp.event.data);
|
|
8020
|
+
yield $dara.cast<$_model.RunDocSmartCardResponse>({
|
|
8021
|
+
statusCode: resp.statusCode,
|
|
8022
|
+
headers: resp.headers,
|
|
8023
|
+
body: {
|
|
8024
|
+
...data,
|
|
8025
|
+
RequestId: resp.event.id,
|
|
8026
|
+
Message: resp.event.event,
|
|
8027
|
+
},
|
|
8028
|
+
}, new $_model.RunDocSmartCardResponse({}));
|
|
8029
|
+
}
|
|
7404
8030
|
}
|
|
7405
8031
|
|
|
7406
8032
|
/**
|
|
7407
|
-
*
|
|
8033
|
+
* 文档智能卡片接口
|
|
7408
8034
|
*
|
|
7409
|
-
* @param request -
|
|
8035
|
+
* @param request - RunDocSmartCardRequest
|
|
7410
8036
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7411
|
-
* @returns
|
|
8037
|
+
* @returns RunDocSmartCardResponse
|
|
7412
8038
|
*/
|
|
7413
|
-
async
|
|
8039
|
+
async runDocSmartCardWithOptions(request: $_model.RunDocSmartCardRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSmartCardResponse> {
|
|
7414
8040
|
request.validate();
|
|
7415
8041
|
let body : {[key: string ]: any} = { };
|
|
7416
8042
|
if (!$dara.isNull(request.docId)) {
|
|
@@ -7421,8 +8047,8 @@ export default class Client extends OpenApi {
|
|
|
7421
8047
|
body["ModelName"] = request.modelName;
|
|
7422
8048
|
}
|
|
7423
8049
|
|
|
7424
|
-
if (!$dara.isNull(request.
|
|
7425
|
-
body["
|
|
8050
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8051
|
+
body["Prompt"] = request.prompt;
|
|
7426
8052
|
}
|
|
7427
8053
|
|
|
7428
8054
|
if (!$dara.isNull(request.sessionId)) {
|
|
@@ -7437,7 +8063,7 @@ export default class Client extends OpenApi {
|
|
|
7437
8063
|
body: OpenApiUtil.parseToMap(body),
|
|
7438
8064
|
});
|
|
7439
8065
|
let params = new $OpenApiUtil.Params({
|
|
7440
|
-
action: "
|
|
8066
|
+
action: "RunDocSmartCard",
|
|
7441
8067
|
version: "2023-08-01",
|
|
7442
8068
|
protocol: "HTTPS",
|
|
7443
8069
|
pathname: "/",
|
|
@@ -7447,30 +8073,34 @@ export default class Client extends OpenApi {
|
|
|
7447
8073
|
reqBodyType: "formData",
|
|
7448
8074
|
bodyType: "json",
|
|
7449
8075
|
});
|
|
7450
|
-
return $dara.cast<$_model.
|
|
8076
|
+
return $dara.cast<$_model.RunDocSmartCardResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSmartCardResponse({}));
|
|
7451
8077
|
}
|
|
7452
8078
|
|
|
7453
8079
|
/**
|
|
7454
|
-
*
|
|
8080
|
+
* 文档智能卡片接口
|
|
7455
8081
|
*
|
|
7456
|
-
* @param request -
|
|
7457
|
-
* @returns
|
|
8082
|
+
* @param request - RunDocSmartCardRequest
|
|
8083
|
+
* @returns RunDocSmartCardResponse
|
|
7458
8084
|
*/
|
|
7459
|
-
async
|
|
8085
|
+
async runDocSmartCard(request: $_model.RunDocSmartCardRequest): Promise<$_model.RunDocSmartCardResponse> {
|
|
7460
8086
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7461
|
-
return await this.
|
|
8087
|
+
return await this.runDocSmartCardWithOptions(request, runtime);
|
|
7462
8088
|
}
|
|
7463
8089
|
|
|
7464
8090
|
/**
|
|
7465
|
-
*
|
|
8091
|
+
* 妙读文档总结摘要接口
|
|
7466
8092
|
*
|
|
7467
|
-
* @param request -
|
|
8093
|
+
* @param request - RunDocSummaryRequest
|
|
7468
8094
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7469
|
-
* @returns
|
|
8095
|
+
* @returns RunDocSummaryResponse
|
|
7470
8096
|
*/
|
|
7471
|
-
async
|
|
8097
|
+
async *runDocSummaryWithSSE(request: $_model.RunDocSummaryRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocSummaryResponse, any, unknown> {
|
|
7472
8098
|
request.validate();
|
|
7473
8099
|
let body : {[key: string ]: any} = { };
|
|
8100
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
8101
|
+
body["CleanCache"] = request.cleanCache;
|
|
8102
|
+
}
|
|
8103
|
+
|
|
7474
8104
|
if (!$dara.isNull(request.docId)) {
|
|
7475
8105
|
body["DocId"] = request.docId;
|
|
7476
8106
|
}
|
|
@@ -7479,12 +8109,12 @@ export default class Client extends OpenApi {
|
|
|
7479
8109
|
body["ModelName"] = request.modelName;
|
|
7480
8110
|
}
|
|
7481
8111
|
|
|
7482
|
-
if (!$dara.isNull(request.
|
|
7483
|
-
body["
|
|
8112
|
+
if (!$dara.isNull(request.query)) {
|
|
8113
|
+
body["Query"] = request.query;
|
|
7484
8114
|
}
|
|
7485
8115
|
|
|
7486
|
-
if (!$dara.isNull(request.
|
|
7487
|
-
body["
|
|
8116
|
+
if (!$dara.isNull(request.recommendContent)) {
|
|
8117
|
+
body["RecommendContent"] = request.recommendContent;
|
|
7488
8118
|
}
|
|
7489
8119
|
|
|
7490
8120
|
if (!$dara.isNull(request.sessionId)) {
|
|
@@ -7499,7 +8129,7 @@ export default class Client extends OpenApi {
|
|
|
7499
8129
|
body: OpenApiUtil.parseToMap(body),
|
|
7500
8130
|
});
|
|
7501
8131
|
let params = new $OpenApiUtil.Params({
|
|
7502
|
-
action: "
|
|
8132
|
+
action: "RunDocSummary",
|
|
7503
8133
|
version: "2023-08-01",
|
|
7504
8134
|
protocol: "HTTPS",
|
|
7505
8135
|
pathname: "/",
|
|
@@ -7509,57 +8139,65 @@ export default class Client extends OpenApi {
|
|
|
7509
8139
|
reqBodyType: "formData",
|
|
7510
8140
|
bodyType: "json",
|
|
7511
8141
|
});
|
|
7512
|
-
|
|
7513
|
-
}
|
|
8142
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7514
8143
|
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
8144
|
+
for await (let resp of sseResp) {
|
|
8145
|
+
let data = JSON.parse(resp.event.data);
|
|
8146
|
+
yield $dara.cast<$_model.RunDocSummaryResponse>({
|
|
8147
|
+
statusCode: resp.statusCode,
|
|
8148
|
+
headers: resp.headers,
|
|
8149
|
+
body: {
|
|
8150
|
+
...data,
|
|
8151
|
+
RequestId: resp.event.id,
|
|
8152
|
+
Message: resp.event.event,
|
|
8153
|
+
},
|
|
8154
|
+
}, new $_model.RunDocSummaryResponse({}));
|
|
8155
|
+
}
|
|
7524
8156
|
}
|
|
7525
8157
|
|
|
7526
8158
|
/**
|
|
7527
|
-
*
|
|
8159
|
+
* 妙读文档总结摘要接口
|
|
7528
8160
|
*
|
|
7529
|
-
* @param
|
|
8161
|
+
* @param request - RunDocSummaryRequest
|
|
7530
8162
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7531
|
-
* @returns
|
|
8163
|
+
* @returns RunDocSummaryResponse
|
|
7532
8164
|
*/
|
|
7533
|
-
async
|
|
7534
|
-
|
|
7535
|
-
let request = new $_model.RunKeywordsExtractionGenerationShrinkRequest({ });
|
|
7536
|
-
OpenApiUtil.convert(tmpReq, request);
|
|
7537
|
-
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
7538
|
-
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
7539
|
-
}
|
|
7540
|
-
|
|
8165
|
+
async runDocSummaryWithOptions(request: $_model.RunDocSummaryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSummaryResponse> {
|
|
8166
|
+
request.validate();
|
|
7541
8167
|
let body : {[key: string ]: any} = { };
|
|
7542
|
-
if (!$dara.isNull(request.
|
|
7543
|
-
body["
|
|
8168
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
8169
|
+
body["CleanCache"] = request.cleanCache;
|
|
7544
8170
|
}
|
|
7545
8171
|
|
|
7546
|
-
if (!$dara.isNull(request.
|
|
7547
|
-
body["
|
|
8172
|
+
if (!$dara.isNull(request.docId)) {
|
|
8173
|
+
body["DocId"] = request.docId;
|
|
7548
8174
|
}
|
|
7549
8175
|
|
|
7550
|
-
if (!$dara.isNull(request.
|
|
7551
|
-
body["
|
|
8176
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8177
|
+
body["ModelName"] = request.modelName;
|
|
7552
8178
|
}
|
|
7553
8179
|
|
|
7554
|
-
if (!$dara.isNull(request.
|
|
7555
|
-
body["
|
|
8180
|
+
if (!$dara.isNull(request.query)) {
|
|
8181
|
+
body["Query"] = request.query;
|
|
7556
8182
|
}
|
|
7557
8183
|
|
|
7558
|
-
|
|
8184
|
+
if (!$dara.isNull(request.recommendContent)) {
|
|
8185
|
+
body["RecommendContent"] = request.recommendContent;
|
|
8186
|
+
}
|
|
8187
|
+
|
|
8188
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8189
|
+
body["SessionId"] = request.sessionId;
|
|
8190
|
+
}
|
|
8191
|
+
|
|
8192
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8193
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8194
|
+
}
|
|
8195
|
+
|
|
8196
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7559
8197
|
body: OpenApiUtil.parseToMap(body),
|
|
7560
8198
|
});
|
|
7561
8199
|
let params = new $OpenApiUtil.Params({
|
|
7562
|
-
action: "
|
|
8200
|
+
action: "RunDocSummary",
|
|
7563
8201
|
version: "2023-08-01",
|
|
7564
8202
|
protocol: "HTTPS",
|
|
7565
8203
|
pathname: "/",
|
|
@@ -7569,54 +8207,120 @@ export default class Client extends OpenApi {
|
|
|
7569
8207
|
reqBodyType: "formData",
|
|
7570
8208
|
bodyType: "json",
|
|
7571
8209
|
});
|
|
7572
|
-
return $dara.cast<$_model.
|
|
8210
|
+
return $dara.cast<$_model.RunDocSummaryResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSummaryResponse({}));
|
|
7573
8211
|
}
|
|
7574
8212
|
|
|
7575
8213
|
/**
|
|
7576
|
-
*
|
|
8214
|
+
* 妙读文档总结摘要接口
|
|
7577
8215
|
*
|
|
7578
|
-
* @param request -
|
|
7579
|
-
* @returns
|
|
8216
|
+
* @param request - RunDocSummaryRequest
|
|
8217
|
+
* @returns RunDocSummaryResponse
|
|
7580
8218
|
*/
|
|
7581
|
-
async
|
|
8219
|
+
async runDocSummary(request: $_model.RunDocSummaryRequest): Promise<$_model.RunDocSummaryResponse> {
|
|
7582
8220
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7583
|
-
return await this.
|
|
8221
|
+
return await this.runDocSummaryWithOptions(request, runtime);
|
|
7584
8222
|
}
|
|
7585
8223
|
|
|
7586
8224
|
/**
|
|
7587
|
-
*
|
|
8225
|
+
* 妙读文档翻译接口
|
|
7588
8226
|
*
|
|
7589
|
-
* @param
|
|
8227
|
+
* @param request - RunDocTranslationRequest
|
|
7590
8228
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7591
|
-
* @returns
|
|
8229
|
+
* @returns RunDocTranslationResponse
|
|
7592
8230
|
*/
|
|
7593
|
-
async
|
|
7594
|
-
|
|
7595
|
-
let
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
8231
|
+
async *runDocTranslationWithSSE(request: $_model.RunDocTranslationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocTranslationResponse, any, unknown> {
|
|
8232
|
+
request.validate();
|
|
8233
|
+
let body : {[key: string ]: any} = { };
|
|
8234
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
8235
|
+
body["CleanCache"] = request.cleanCache;
|
|
8236
|
+
}
|
|
8237
|
+
|
|
8238
|
+
if (!$dara.isNull(request.docId)) {
|
|
8239
|
+
body["DocId"] = request.docId;
|
|
8240
|
+
}
|
|
8241
|
+
|
|
8242
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8243
|
+
body["ModelName"] = request.modelName;
|
|
8244
|
+
}
|
|
8245
|
+
|
|
8246
|
+
if (!$dara.isNull(request.recommendContent)) {
|
|
8247
|
+
body["RecommendContent"] = request.recommendContent;
|
|
8248
|
+
}
|
|
8249
|
+
|
|
8250
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8251
|
+
body["SessionId"] = request.sessionId;
|
|
8252
|
+
}
|
|
8253
|
+
|
|
8254
|
+
if (!$dara.isNull(request.transType)) {
|
|
8255
|
+
body["TransType"] = request.transType;
|
|
8256
|
+
}
|
|
8257
|
+
|
|
8258
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8259
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8260
|
+
}
|
|
8261
|
+
|
|
8262
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8263
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8264
|
+
});
|
|
8265
|
+
let params = new $OpenApiUtil.Params({
|
|
8266
|
+
action: "RunDocTranslation",
|
|
8267
|
+
version: "2023-08-01",
|
|
8268
|
+
protocol: "HTTPS",
|
|
8269
|
+
pathname: "/",
|
|
8270
|
+
method: "POST",
|
|
8271
|
+
authType: "AK",
|
|
8272
|
+
style: "RPC",
|
|
8273
|
+
reqBodyType: "formData",
|
|
8274
|
+
bodyType: "json",
|
|
8275
|
+
});
|
|
8276
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8277
|
+
|
|
8278
|
+
for await (let resp of sseResp) {
|
|
8279
|
+
let data = JSON.parse(resp.event.data);
|
|
8280
|
+
yield $dara.cast<$_model.RunDocTranslationResponse>({
|
|
8281
|
+
statusCode: resp.statusCode,
|
|
8282
|
+
headers: resp.headers,
|
|
8283
|
+
body: {
|
|
8284
|
+
...data,
|
|
8285
|
+
RequestId: resp.event.id,
|
|
8286
|
+
Message: resp.event.event,
|
|
8287
|
+
},
|
|
8288
|
+
}, new $_model.RunDocTranslationResponse({}));
|
|
7599
8289
|
}
|
|
8290
|
+
}
|
|
7600
8291
|
|
|
8292
|
+
/**
|
|
8293
|
+
* 妙读文档翻译接口
|
|
8294
|
+
*
|
|
8295
|
+
* @param request - RunDocTranslationRequest
|
|
8296
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8297
|
+
* @returns RunDocTranslationResponse
|
|
8298
|
+
*/
|
|
8299
|
+
async runDocTranslationWithOptions(request: $_model.RunDocTranslationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocTranslationResponse> {
|
|
8300
|
+
request.validate();
|
|
7601
8301
|
let body : {[key: string ]: any} = { };
|
|
7602
|
-
if (!$dara.isNull(request.
|
|
7603
|
-
body["
|
|
8302
|
+
if (!$dara.isNull(request.cleanCache)) {
|
|
8303
|
+
body["CleanCache"] = request.cleanCache;
|
|
7604
8304
|
}
|
|
7605
8305
|
|
|
7606
|
-
if (!$dara.isNull(request.
|
|
7607
|
-
body["
|
|
8306
|
+
if (!$dara.isNull(request.docId)) {
|
|
8307
|
+
body["DocId"] = request.docId;
|
|
7608
8308
|
}
|
|
7609
8309
|
|
|
7610
8310
|
if (!$dara.isNull(request.modelName)) {
|
|
7611
8311
|
body["ModelName"] = request.modelName;
|
|
7612
8312
|
}
|
|
7613
8313
|
|
|
8314
|
+
if (!$dara.isNull(request.recommendContent)) {
|
|
8315
|
+
body["RecommendContent"] = request.recommendContent;
|
|
8316
|
+
}
|
|
8317
|
+
|
|
7614
8318
|
if (!$dara.isNull(request.sessionId)) {
|
|
7615
8319
|
body["SessionId"] = request.sessionId;
|
|
7616
8320
|
}
|
|
7617
8321
|
|
|
7618
|
-
if (!$dara.isNull(request.
|
|
7619
|
-
body["
|
|
8322
|
+
if (!$dara.isNull(request.transType)) {
|
|
8323
|
+
body["TransType"] = request.transType;
|
|
7620
8324
|
}
|
|
7621
8325
|
|
|
7622
8326
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -7627,7 +8331,7 @@ export default class Client extends OpenApi {
|
|
|
7627
8331
|
body: OpenApiUtil.parseToMap(body),
|
|
7628
8332
|
});
|
|
7629
8333
|
let params = new $OpenApiUtil.Params({
|
|
7630
|
-
action: "
|
|
8334
|
+
action: "RunDocTranslation",
|
|
7631
8335
|
version: "2023-08-01",
|
|
7632
8336
|
protocol: "HTTPS",
|
|
7633
8337
|
pathname: "/",
|
|
@@ -7637,62 +8341,1454 @@ export default class Client extends OpenApi {
|
|
|
7637
8341
|
reqBodyType: "formData",
|
|
7638
8342
|
bodyType: "json",
|
|
7639
8343
|
});
|
|
7640
|
-
return $dara.cast<$_model.
|
|
8344
|
+
return $dara.cast<$_model.RunDocTranslationResponse>(await this.callApi(params, req, runtime), new $_model.RunDocTranslationResponse({}));
|
|
7641
8345
|
}
|
|
7642
8346
|
|
|
7643
8347
|
/**
|
|
7644
|
-
*
|
|
8348
|
+
* 妙读文档翻译接口
|
|
7645
8349
|
*
|
|
7646
|
-
* @param request -
|
|
7647
|
-
* @returns
|
|
8350
|
+
* @param request - RunDocTranslationRequest
|
|
8351
|
+
* @returns RunDocTranslationResponse
|
|
7648
8352
|
*/
|
|
7649
|
-
async
|
|
8353
|
+
async runDocTranslation(request: $_model.RunDocTranslationRequest): Promise<$_model.RunDocTranslationResponse> {
|
|
7650
8354
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7651
|
-
return await this.
|
|
8355
|
+
return await this.runDocTranslationWithOptions(request, runtime);
|
|
7652
8356
|
}
|
|
7653
8357
|
|
|
7654
8358
|
/**
|
|
7655
|
-
*
|
|
8359
|
+
* 文档改写
|
|
7656
8360
|
*
|
|
7657
|
-
* @param
|
|
8361
|
+
* @param request - RunDocWashingRequest
|
|
7658
8362
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7659
|
-
* @returns
|
|
8363
|
+
* @returns RunDocWashingResponse
|
|
7660
8364
|
*/
|
|
7661
|
-
async
|
|
7662
|
-
|
|
7663
|
-
let
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
|
|
8365
|
+
async *runDocWashingWithSSE(request: $_model.RunDocWashingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocWashingResponse, any, unknown> {
|
|
8366
|
+
request.validate();
|
|
8367
|
+
let body : {[key: string ]: any} = { };
|
|
8368
|
+
if (!$dara.isNull(request.modelId)) {
|
|
8369
|
+
body["ModelId"] = request.modelId;
|
|
7667
8370
|
}
|
|
7668
8371
|
|
|
7669
|
-
if (!$dara.isNull(
|
|
7670
|
-
|
|
8372
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8373
|
+
body["Prompt"] = request.prompt;
|
|
7671
8374
|
}
|
|
7672
8375
|
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
body["AgentContext"] = request.agentContextShrink;
|
|
8376
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8377
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
7676
8378
|
}
|
|
7677
8379
|
|
|
7678
|
-
if (!$dara.isNull(request.
|
|
7679
|
-
body["
|
|
8380
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8381
|
+
body["SessionId"] = request.sessionId;
|
|
7680
8382
|
}
|
|
7681
8383
|
|
|
7682
|
-
if (!$dara.isNull(request.
|
|
7683
|
-
body["
|
|
8384
|
+
if (!$dara.isNull(request.topic)) {
|
|
8385
|
+
body["Topic"] = request.topic;
|
|
7684
8386
|
}
|
|
7685
8387
|
|
|
7686
|
-
if (!$dara.isNull(request.
|
|
7687
|
-
body["
|
|
8388
|
+
if (!$dara.isNull(request.wordNumber)) {
|
|
8389
|
+
body["WordNumber"] = request.wordNumber;
|
|
8390
|
+
}
|
|
8391
|
+
|
|
8392
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8393
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8394
|
+
}
|
|
8395
|
+
|
|
8396
|
+
if (!$dara.isNull(request.writingTypeName)) {
|
|
8397
|
+
body["WritingTypeName"] = request.writingTypeName;
|
|
8398
|
+
}
|
|
8399
|
+
|
|
8400
|
+
if (!$dara.isNull(request.writingTypeRefDoc)) {
|
|
8401
|
+
body["WritingTypeRefDoc"] = request.writingTypeRefDoc;
|
|
8402
|
+
}
|
|
8403
|
+
|
|
8404
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8405
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8406
|
+
});
|
|
8407
|
+
let params = new $OpenApiUtil.Params({
|
|
8408
|
+
action: "RunDocWashing",
|
|
8409
|
+
version: "2023-08-01",
|
|
8410
|
+
protocol: "HTTPS",
|
|
8411
|
+
pathname: "/",
|
|
8412
|
+
method: "POST",
|
|
8413
|
+
authType: "AK",
|
|
8414
|
+
style: "RPC",
|
|
8415
|
+
reqBodyType: "formData",
|
|
8416
|
+
bodyType: "json",
|
|
8417
|
+
});
|
|
8418
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8419
|
+
|
|
8420
|
+
for await (let resp of sseResp) {
|
|
8421
|
+
let data = JSON.parse(resp.event.data);
|
|
8422
|
+
yield $dara.cast<$_model.RunDocWashingResponse>({
|
|
8423
|
+
statusCode: resp.statusCode,
|
|
8424
|
+
headers: resp.headers,
|
|
8425
|
+
body: {
|
|
8426
|
+
...data,
|
|
8427
|
+
RequestId: resp.event.id,
|
|
8428
|
+
Message: resp.event.event,
|
|
8429
|
+
},
|
|
8430
|
+
}, new $_model.RunDocWashingResponse({}));
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
8433
|
+
|
|
8434
|
+
/**
|
|
8435
|
+
* 文档改写
|
|
8436
|
+
*
|
|
8437
|
+
* @param request - RunDocWashingRequest
|
|
8438
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8439
|
+
* @returns RunDocWashingResponse
|
|
8440
|
+
*/
|
|
8441
|
+
async runDocWashingWithOptions(request: $_model.RunDocWashingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocWashingResponse> {
|
|
8442
|
+
request.validate();
|
|
8443
|
+
let body : {[key: string ]: any} = { };
|
|
8444
|
+
if (!$dara.isNull(request.modelId)) {
|
|
8445
|
+
body["ModelId"] = request.modelId;
|
|
7688
8446
|
}
|
|
7689
8447
|
|
|
7690
8448
|
if (!$dara.isNull(request.prompt)) {
|
|
7691
8449
|
body["Prompt"] = request.prompt;
|
|
7692
8450
|
}
|
|
7693
8451
|
|
|
7694
|
-
if (!$dara.isNull(request.
|
|
7695
|
-
body["
|
|
8452
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8453
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
8454
|
+
}
|
|
8455
|
+
|
|
8456
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8457
|
+
body["SessionId"] = request.sessionId;
|
|
8458
|
+
}
|
|
8459
|
+
|
|
8460
|
+
if (!$dara.isNull(request.topic)) {
|
|
8461
|
+
body["Topic"] = request.topic;
|
|
8462
|
+
}
|
|
8463
|
+
|
|
8464
|
+
if (!$dara.isNull(request.wordNumber)) {
|
|
8465
|
+
body["WordNumber"] = request.wordNumber;
|
|
8466
|
+
}
|
|
8467
|
+
|
|
8468
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8469
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8470
|
+
}
|
|
8471
|
+
|
|
8472
|
+
if (!$dara.isNull(request.writingTypeName)) {
|
|
8473
|
+
body["WritingTypeName"] = request.writingTypeName;
|
|
8474
|
+
}
|
|
8475
|
+
|
|
8476
|
+
if (!$dara.isNull(request.writingTypeRefDoc)) {
|
|
8477
|
+
body["WritingTypeRefDoc"] = request.writingTypeRefDoc;
|
|
8478
|
+
}
|
|
8479
|
+
|
|
8480
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8481
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8482
|
+
});
|
|
8483
|
+
let params = new $OpenApiUtil.Params({
|
|
8484
|
+
action: "RunDocWashing",
|
|
8485
|
+
version: "2023-08-01",
|
|
8486
|
+
protocol: "HTTPS",
|
|
8487
|
+
pathname: "/",
|
|
8488
|
+
method: "POST",
|
|
8489
|
+
authType: "AK",
|
|
8490
|
+
style: "RPC",
|
|
8491
|
+
reqBodyType: "formData",
|
|
8492
|
+
bodyType: "json",
|
|
8493
|
+
});
|
|
8494
|
+
return $dara.cast<$_model.RunDocWashingResponse>(await this.callApi(params, req, runtime), new $_model.RunDocWashingResponse({}));
|
|
8495
|
+
}
|
|
8496
|
+
|
|
8497
|
+
/**
|
|
8498
|
+
* 文档改写
|
|
8499
|
+
*
|
|
8500
|
+
* @param request - RunDocWashingRequest
|
|
8501
|
+
* @returns RunDocWashingResponse
|
|
8502
|
+
*/
|
|
8503
|
+
async runDocWashing(request: $_model.RunDocWashingRequest): Promise<$_model.RunDocWashingResponse> {
|
|
8504
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
8505
|
+
return await this.runDocWashingWithOptions(request, runtime);
|
|
8506
|
+
}
|
|
8507
|
+
|
|
8508
|
+
/**
|
|
8509
|
+
* 内容扩写
|
|
8510
|
+
*
|
|
8511
|
+
* @param request - RunExpandContentRequest
|
|
8512
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8513
|
+
* @returns RunExpandContentResponse
|
|
8514
|
+
*/
|
|
8515
|
+
async *runExpandContentWithSSE(request: $_model.RunExpandContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunExpandContentResponse, any, unknown> {
|
|
8516
|
+
request.validate();
|
|
8517
|
+
let body : {[key: string ]: any} = { };
|
|
8518
|
+
if (!$dara.isNull(request.content)) {
|
|
8519
|
+
body["Content"] = request.content;
|
|
8520
|
+
}
|
|
8521
|
+
|
|
8522
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8523
|
+
body["Prompt"] = request.prompt;
|
|
8524
|
+
}
|
|
8525
|
+
|
|
8526
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8527
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8528
|
+
}
|
|
8529
|
+
|
|
8530
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8531
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8532
|
+
});
|
|
8533
|
+
let params = new $OpenApiUtil.Params({
|
|
8534
|
+
action: "RunExpandContent",
|
|
8535
|
+
version: "2023-08-01",
|
|
8536
|
+
protocol: "HTTPS",
|
|
8537
|
+
pathname: "/",
|
|
8538
|
+
method: "POST",
|
|
8539
|
+
authType: "AK",
|
|
8540
|
+
style: "RPC",
|
|
8541
|
+
reqBodyType: "formData",
|
|
8542
|
+
bodyType: "json",
|
|
8543
|
+
});
|
|
8544
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8545
|
+
|
|
8546
|
+
for await (let resp of sseResp) {
|
|
8547
|
+
let data = JSON.parse(resp.event.data);
|
|
8548
|
+
yield $dara.cast<$_model.RunExpandContentResponse>({
|
|
8549
|
+
statusCode: resp.statusCode,
|
|
8550
|
+
headers: resp.headers,
|
|
8551
|
+
body: {
|
|
8552
|
+
...data,
|
|
8553
|
+
RequestId: resp.event.id,
|
|
8554
|
+
Message: resp.event.event,
|
|
8555
|
+
},
|
|
8556
|
+
}, new $_model.RunExpandContentResponse({}));
|
|
8557
|
+
}
|
|
8558
|
+
}
|
|
8559
|
+
|
|
8560
|
+
/**
|
|
8561
|
+
* 内容扩写
|
|
8562
|
+
*
|
|
8563
|
+
* @param request - RunExpandContentRequest
|
|
8564
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8565
|
+
* @returns RunExpandContentResponse
|
|
8566
|
+
*/
|
|
8567
|
+
async runExpandContentWithOptions(request: $_model.RunExpandContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunExpandContentResponse> {
|
|
8568
|
+
request.validate();
|
|
8569
|
+
let body : {[key: string ]: any} = { };
|
|
8570
|
+
if (!$dara.isNull(request.content)) {
|
|
8571
|
+
body["Content"] = request.content;
|
|
8572
|
+
}
|
|
8573
|
+
|
|
8574
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8575
|
+
body["Prompt"] = request.prompt;
|
|
8576
|
+
}
|
|
8577
|
+
|
|
8578
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8579
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8580
|
+
}
|
|
8581
|
+
|
|
8582
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8583
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8584
|
+
});
|
|
8585
|
+
let params = new $OpenApiUtil.Params({
|
|
8586
|
+
action: "RunExpandContent",
|
|
8587
|
+
version: "2023-08-01",
|
|
8588
|
+
protocol: "HTTPS",
|
|
8589
|
+
pathname: "/",
|
|
8590
|
+
method: "POST",
|
|
8591
|
+
authType: "AK",
|
|
8592
|
+
style: "RPC",
|
|
8593
|
+
reqBodyType: "formData",
|
|
8594
|
+
bodyType: "json",
|
|
8595
|
+
});
|
|
8596
|
+
return $dara.cast<$_model.RunExpandContentResponse>(await this.callApi(params, req, runtime), new $_model.RunExpandContentResponse({}));
|
|
8597
|
+
}
|
|
8598
|
+
|
|
8599
|
+
/**
|
|
8600
|
+
* 内容扩写
|
|
8601
|
+
*
|
|
8602
|
+
* @param request - RunExpandContentRequest
|
|
8603
|
+
* @returns RunExpandContentResponse
|
|
8604
|
+
*/
|
|
8605
|
+
async runExpandContent(request: $_model.RunExpandContentRequest): Promise<$_model.RunExpandContentResponse> {
|
|
8606
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
8607
|
+
return await this.runExpandContentWithOptions(request, runtime);
|
|
8608
|
+
}
|
|
8609
|
+
|
|
8610
|
+
/**
|
|
8611
|
+
* 妙读猜你想问接口
|
|
8612
|
+
*
|
|
8613
|
+
* @param request - RunGenerateQuestionsRequest
|
|
8614
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8615
|
+
* @returns RunGenerateQuestionsResponse
|
|
8616
|
+
*/
|
|
8617
|
+
async *runGenerateQuestionsWithSSE(request: $_model.RunGenerateQuestionsRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunGenerateQuestionsResponse, any, unknown> {
|
|
8618
|
+
request.validate();
|
|
8619
|
+
let body : {[key: string ]: any} = { };
|
|
8620
|
+
if (!$dara.isNull(request.docId)) {
|
|
8621
|
+
body["DocId"] = request.docId;
|
|
8622
|
+
}
|
|
8623
|
+
|
|
8624
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8625
|
+
body["ModelName"] = request.modelName;
|
|
8626
|
+
}
|
|
8627
|
+
|
|
8628
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8629
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
8630
|
+
}
|
|
8631
|
+
|
|
8632
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8633
|
+
body["SessionId"] = request.sessionId;
|
|
8634
|
+
}
|
|
8635
|
+
|
|
8636
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8637
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8640
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8641
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8642
|
+
});
|
|
8643
|
+
let params = new $OpenApiUtil.Params({
|
|
8644
|
+
action: "RunGenerateQuestions",
|
|
8645
|
+
version: "2023-08-01",
|
|
8646
|
+
protocol: "HTTPS",
|
|
8647
|
+
pathname: "/",
|
|
8648
|
+
method: "POST",
|
|
8649
|
+
authType: "AK",
|
|
8650
|
+
style: "RPC",
|
|
8651
|
+
reqBodyType: "formData",
|
|
8652
|
+
bodyType: "json",
|
|
8653
|
+
});
|
|
8654
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8655
|
+
|
|
8656
|
+
for await (let resp of sseResp) {
|
|
8657
|
+
let data = JSON.parse(resp.event.data);
|
|
8658
|
+
yield $dara.cast<$_model.RunGenerateQuestionsResponse>({
|
|
8659
|
+
statusCode: resp.statusCode,
|
|
8660
|
+
headers: resp.headers,
|
|
8661
|
+
body: {
|
|
8662
|
+
...data,
|
|
8663
|
+
RequestId: resp.event.id,
|
|
8664
|
+
Message: resp.event.event,
|
|
8665
|
+
},
|
|
8666
|
+
}, new $_model.RunGenerateQuestionsResponse({}));
|
|
8667
|
+
}
|
|
8668
|
+
}
|
|
8669
|
+
|
|
8670
|
+
/**
|
|
8671
|
+
* 妙读猜你想问接口
|
|
8672
|
+
*
|
|
8673
|
+
* @param request - RunGenerateQuestionsRequest
|
|
8674
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8675
|
+
* @returns RunGenerateQuestionsResponse
|
|
8676
|
+
*/
|
|
8677
|
+
async runGenerateQuestionsWithOptions(request: $_model.RunGenerateQuestionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunGenerateQuestionsResponse> {
|
|
8678
|
+
request.validate();
|
|
8679
|
+
let body : {[key: string ]: any} = { };
|
|
8680
|
+
if (!$dara.isNull(request.docId)) {
|
|
8681
|
+
body["DocId"] = request.docId;
|
|
8682
|
+
}
|
|
8683
|
+
|
|
8684
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8685
|
+
body["ModelName"] = request.modelName;
|
|
8686
|
+
}
|
|
8687
|
+
|
|
8688
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8689
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
8690
|
+
}
|
|
8691
|
+
|
|
8692
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8693
|
+
body["SessionId"] = request.sessionId;
|
|
8694
|
+
}
|
|
8695
|
+
|
|
8696
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8697
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8698
|
+
}
|
|
8699
|
+
|
|
8700
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8701
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8702
|
+
});
|
|
8703
|
+
let params = new $OpenApiUtil.Params({
|
|
8704
|
+
action: "RunGenerateQuestions",
|
|
8705
|
+
version: "2023-08-01",
|
|
8706
|
+
protocol: "HTTPS",
|
|
8707
|
+
pathname: "/",
|
|
8708
|
+
method: "POST",
|
|
8709
|
+
authType: "AK",
|
|
8710
|
+
style: "RPC",
|
|
8711
|
+
reqBodyType: "formData",
|
|
8712
|
+
bodyType: "json",
|
|
8713
|
+
});
|
|
8714
|
+
return $dara.cast<$_model.RunGenerateQuestionsResponse>(await this.callApi(params, req, runtime), new $_model.RunGenerateQuestionsResponse({}));
|
|
8715
|
+
}
|
|
8716
|
+
|
|
8717
|
+
/**
|
|
8718
|
+
* 妙读猜你想问接口
|
|
8719
|
+
*
|
|
8720
|
+
* @param request - RunGenerateQuestionsRequest
|
|
8721
|
+
* @returns RunGenerateQuestionsResponse
|
|
8722
|
+
*/
|
|
8723
|
+
async runGenerateQuestions(request: $_model.RunGenerateQuestionsRequest): Promise<$_model.RunGenerateQuestionsResponse> {
|
|
8724
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
8725
|
+
return await this.runGenerateQuestionsWithOptions(request, runtime);
|
|
8726
|
+
}
|
|
8727
|
+
|
|
8728
|
+
/**
|
|
8729
|
+
* 妙读文档关键词抽取接口
|
|
8730
|
+
*
|
|
8731
|
+
* @param request - RunHotwordRequest
|
|
8732
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8733
|
+
* @returns RunHotwordResponse
|
|
8734
|
+
*/
|
|
8735
|
+
async *runHotwordWithSSE(request: $_model.RunHotwordRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunHotwordResponse, any, unknown> {
|
|
8736
|
+
request.validate();
|
|
8737
|
+
let body : {[key: string ]: any} = { };
|
|
8738
|
+
if (!$dara.isNull(request.docId)) {
|
|
8739
|
+
body["DocId"] = request.docId;
|
|
8740
|
+
}
|
|
8741
|
+
|
|
8742
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8743
|
+
body["ModelName"] = request.modelName;
|
|
8744
|
+
}
|
|
8745
|
+
|
|
8746
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8747
|
+
body["Prompt"] = request.prompt;
|
|
8748
|
+
}
|
|
8749
|
+
|
|
8750
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8751
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
8752
|
+
}
|
|
8753
|
+
|
|
8754
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8755
|
+
body["SessionId"] = request.sessionId;
|
|
8756
|
+
}
|
|
8757
|
+
|
|
8758
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8759
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8760
|
+
}
|
|
8761
|
+
|
|
8762
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8763
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8764
|
+
});
|
|
8765
|
+
let params = new $OpenApiUtil.Params({
|
|
8766
|
+
action: "RunHotword",
|
|
8767
|
+
version: "2023-08-01",
|
|
8768
|
+
protocol: "HTTPS",
|
|
8769
|
+
pathname: "/",
|
|
8770
|
+
method: "POST",
|
|
8771
|
+
authType: "AK",
|
|
8772
|
+
style: "RPC",
|
|
8773
|
+
reqBodyType: "formData",
|
|
8774
|
+
bodyType: "json",
|
|
8775
|
+
});
|
|
8776
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8777
|
+
|
|
8778
|
+
for await (let resp of sseResp) {
|
|
8779
|
+
let data = JSON.parse(resp.event.data);
|
|
8780
|
+
yield $dara.cast<$_model.RunHotwordResponse>({
|
|
8781
|
+
statusCode: resp.statusCode,
|
|
8782
|
+
headers: resp.headers,
|
|
8783
|
+
body: {
|
|
8784
|
+
...data,
|
|
8785
|
+
RequestId: resp.event.id,
|
|
8786
|
+
Message: resp.event.event,
|
|
8787
|
+
},
|
|
8788
|
+
}, new $_model.RunHotwordResponse({}));
|
|
8789
|
+
}
|
|
8790
|
+
}
|
|
8791
|
+
|
|
8792
|
+
/**
|
|
8793
|
+
* 妙读文档关键词抽取接口
|
|
8794
|
+
*
|
|
8795
|
+
* @param request - RunHotwordRequest
|
|
8796
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8797
|
+
* @returns RunHotwordResponse
|
|
8798
|
+
*/
|
|
8799
|
+
async runHotwordWithOptions(request: $_model.RunHotwordRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotwordResponse> {
|
|
8800
|
+
request.validate();
|
|
8801
|
+
let body : {[key: string ]: any} = { };
|
|
8802
|
+
if (!$dara.isNull(request.docId)) {
|
|
8803
|
+
body["DocId"] = request.docId;
|
|
8804
|
+
}
|
|
8805
|
+
|
|
8806
|
+
if (!$dara.isNull(request.modelName)) {
|
|
8807
|
+
body["ModelName"] = request.modelName;
|
|
8808
|
+
}
|
|
8809
|
+
|
|
8810
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8811
|
+
body["Prompt"] = request.prompt;
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8814
|
+
if (!$dara.isNull(request.referenceContent)) {
|
|
8815
|
+
body["ReferenceContent"] = request.referenceContent;
|
|
8816
|
+
}
|
|
8817
|
+
|
|
8818
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
8819
|
+
body["SessionId"] = request.sessionId;
|
|
8820
|
+
}
|
|
8821
|
+
|
|
8822
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8823
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8824
|
+
}
|
|
8825
|
+
|
|
8826
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8827
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8828
|
+
});
|
|
8829
|
+
let params = new $OpenApiUtil.Params({
|
|
8830
|
+
action: "RunHotword",
|
|
8831
|
+
version: "2023-08-01",
|
|
8832
|
+
protocol: "HTTPS",
|
|
8833
|
+
pathname: "/",
|
|
8834
|
+
method: "POST",
|
|
8835
|
+
authType: "AK",
|
|
8836
|
+
style: "RPC",
|
|
8837
|
+
reqBodyType: "formData",
|
|
8838
|
+
bodyType: "json",
|
|
8839
|
+
});
|
|
8840
|
+
return $dara.cast<$_model.RunHotwordResponse>(await this.callApi(params, req, runtime), new $_model.RunHotwordResponse({}));
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8843
|
+
/**
|
|
8844
|
+
* 妙读文档关键词抽取接口
|
|
8845
|
+
*
|
|
8846
|
+
* @param request - RunHotwordRequest
|
|
8847
|
+
* @returns RunHotwordResponse
|
|
8848
|
+
*/
|
|
8849
|
+
async runHotword(request: $_model.RunHotwordRequest): Promise<$_model.RunHotwordResponse> {
|
|
8850
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
8851
|
+
return await this.runHotwordWithOptions(request, runtime);
|
|
8852
|
+
}
|
|
8853
|
+
|
|
8854
|
+
/**
|
|
8855
|
+
* AI妙笔-创作-抽取关键词
|
|
8856
|
+
*
|
|
8857
|
+
* @param tmpReq - RunKeywordsExtractionGenerationRequest
|
|
8858
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8859
|
+
* @returns RunKeywordsExtractionGenerationResponse
|
|
8860
|
+
*/
|
|
8861
|
+
async *runKeywordsExtractionGenerationWithSSE(tmpReq: $_model.RunKeywordsExtractionGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunKeywordsExtractionGenerationResponse, any, unknown> {
|
|
8862
|
+
tmpReq.validate();
|
|
8863
|
+
let request = new $_model.RunKeywordsExtractionGenerationShrinkRequest({ });
|
|
8864
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
8865
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
8866
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
8867
|
+
}
|
|
8868
|
+
|
|
8869
|
+
let body : {[key: string ]: any} = { };
|
|
8870
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8871
|
+
body["Prompt"] = request.prompt;
|
|
8872
|
+
}
|
|
8873
|
+
|
|
8874
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
8875
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
8876
|
+
}
|
|
8877
|
+
|
|
8878
|
+
if (!$dara.isNull(request.taskId)) {
|
|
8879
|
+
body["TaskId"] = request.taskId;
|
|
8880
|
+
}
|
|
8881
|
+
|
|
8882
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8883
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8884
|
+
}
|
|
8885
|
+
|
|
8886
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8887
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8888
|
+
});
|
|
8889
|
+
let params = new $OpenApiUtil.Params({
|
|
8890
|
+
action: "RunKeywordsExtractionGeneration",
|
|
8891
|
+
version: "2023-08-01",
|
|
8892
|
+
protocol: "HTTPS",
|
|
8893
|
+
pathname: "/",
|
|
8894
|
+
method: "POST",
|
|
8895
|
+
authType: "AK",
|
|
8896
|
+
style: "RPC",
|
|
8897
|
+
reqBodyType: "formData",
|
|
8898
|
+
bodyType: "json",
|
|
8899
|
+
});
|
|
8900
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8901
|
+
|
|
8902
|
+
for await (let resp of sseResp) {
|
|
8903
|
+
let data = JSON.parse(resp.event.data);
|
|
8904
|
+
yield $dara.cast<$_model.RunKeywordsExtractionGenerationResponse>({
|
|
8905
|
+
statusCode: resp.statusCode,
|
|
8906
|
+
headers: resp.headers,
|
|
8907
|
+
body: {
|
|
8908
|
+
...data,
|
|
8909
|
+
RequestId: resp.event.id,
|
|
8910
|
+
Message: resp.event.event,
|
|
8911
|
+
},
|
|
8912
|
+
}, new $_model.RunKeywordsExtractionGenerationResponse({}));
|
|
8913
|
+
}
|
|
8914
|
+
}
|
|
8915
|
+
|
|
8916
|
+
/**
|
|
8917
|
+
* AI妙笔-创作-抽取关键词
|
|
8918
|
+
*
|
|
8919
|
+
* @param tmpReq - RunKeywordsExtractionGenerationRequest
|
|
8920
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8921
|
+
* @returns RunKeywordsExtractionGenerationResponse
|
|
8922
|
+
*/
|
|
8923
|
+
async runKeywordsExtractionGenerationWithOptions(tmpReq: $_model.RunKeywordsExtractionGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
|
|
8924
|
+
tmpReq.validate();
|
|
8925
|
+
let request = new $_model.RunKeywordsExtractionGenerationShrinkRequest({ });
|
|
8926
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
8927
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
8928
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
8929
|
+
}
|
|
8930
|
+
|
|
8931
|
+
let body : {[key: string ]: any} = { };
|
|
8932
|
+
if (!$dara.isNull(request.prompt)) {
|
|
8933
|
+
body["Prompt"] = request.prompt;
|
|
8934
|
+
}
|
|
8935
|
+
|
|
8936
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
8937
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
8938
|
+
}
|
|
8939
|
+
|
|
8940
|
+
if (!$dara.isNull(request.taskId)) {
|
|
8941
|
+
body["TaskId"] = request.taskId;
|
|
8942
|
+
}
|
|
8943
|
+
|
|
8944
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
8945
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
8946
|
+
}
|
|
8947
|
+
|
|
8948
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8949
|
+
body: OpenApiUtil.parseToMap(body),
|
|
8950
|
+
});
|
|
8951
|
+
let params = new $OpenApiUtil.Params({
|
|
8952
|
+
action: "RunKeywordsExtractionGeneration",
|
|
8953
|
+
version: "2023-08-01",
|
|
8954
|
+
protocol: "HTTPS",
|
|
8955
|
+
pathname: "/",
|
|
8956
|
+
method: "POST",
|
|
8957
|
+
authType: "AK",
|
|
8958
|
+
style: "RPC",
|
|
8959
|
+
reqBodyType: "formData",
|
|
8960
|
+
bodyType: "json",
|
|
8961
|
+
});
|
|
8962
|
+
return $dara.cast<$_model.RunKeywordsExtractionGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunKeywordsExtractionGenerationResponse({}));
|
|
8963
|
+
}
|
|
8964
|
+
|
|
8965
|
+
/**
|
|
8966
|
+
* AI妙笔-创作-抽取关键词
|
|
8967
|
+
*
|
|
8968
|
+
* @param request - RunKeywordsExtractionGenerationRequest
|
|
8969
|
+
* @returns RunKeywordsExtractionGenerationResponse
|
|
8970
|
+
*/
|
|
8971
|
+
async runKeywordsExtractionGeneration(request: $_model.RunKeywordsExtractionGenerationRequest): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
|
|
8972
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
8973
|
+
return await this.runKeywordsExtractionGenerationWithOptions(request, runtime);
|
|
8974
|
+
}
|
|
8975
|
+
|
|
8976
|
+
/**
|
|
8977
|
+
* 文档批量导读
|
|
8978
|
+
*
|
|
8979
|
+
* @param tmpReq - RunMultiDocIntroductionRequest
|
|
8980
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8981
|
+
* @returns RunMultiDocIntroductionResponse
|
|
8982
|
+
*/
|
|
8983
|
+
async *runMultiDocIntroductionWithSSE(tmpReq: $_model.RunMultiDocIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunMultiDocIntroductionResponse, any, unknown> {
|
|
8984
|
+
tmpReq.validate();
|
|
8985
|
+
let request = new $_model.RunMultiDocIntroductionShrinkRequest({ });
|
|
8986
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
8987
|
+
if (!$dara.isNull(tmpReq.docIds)) {
|
|
8988
|
+
request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
|
|
8989
|
+
}
|
|
8990
|
+
|
|
8991
|
+
let body : {[key: string ]: any} = { };
|
|
8992
|
+
if (!$dara.isNull(request.docIdsShrink)) {
|
|
8993
|
+
body["DocIds"] = request.docIdsShrink;
|
|
8994
|
+
}
|
|
8995
|
+
|
|
8996
|
+
if (!$dara.isNull(request.keyPointPrompt)) {
|
|
8997
|
+
body["KeyPointPrompt"] = request.keyPointPrompt;
|
|
8998
|
+
}
|
|
8999
|
+
|
|
9000
|
+
if (!$dara.isNull(request.modelName)) {
|
|
9001
|
+
body["ModelName"] = request.modelName;
|
|
9002
|
+
}
|
|
9003
|
+
|
|
9004
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
9005
|
+
body["SessionId"] = request.sessionId;
|
|
9006
|
+
}
|
|
9007
|
+
|
|
9008
|
+
if (!$dara.isNull(request.summaryPrompt)) {
|
|
9009
|
+
body["SummaryPrompt"] = request.summaryPrompt;
|
|
9010
|
+
}
|
|
9011
|
+
|
|
9012
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9013
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9014
|
+
}
|
|
9015
|
+
|
|
9016
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9017
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9018
|
+
});
|
|
9019
|
+
let params = new $OpenApiUtil.Params({
|
|
9020
|
+
action: "RunMultiDocIntroduction",
|
|
9021
|
+
version: "2023-08-01",
|
|
9022
|
+
protocol: "HTTPS",
|
|
9023
|
+
pathname: "/",
|
|
9024
|
+
method: "POST",
|
|
9025
|
+
authType: "AK",
|
|
9026
|
+
style: "RPC",
|
|
9027
|
+
reqBodyType: "formData",
|
|
9028
|
+
bodyType: "json",
|
|
9029
|
+
});
|
|
9030
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9031
|
+
|
|
9032
|
+
for await (let resp of sseResp) {
|
|
9033
|
+
let data = JSON.parse(resp.event.data);
|
|
9034
|
+
yield $dara.cast<$_model.RunMultiDocIntroductionResponse>({
|
|
9035
|
+
statusCode: resp.statusCode,
|
|
9036
|
+
headers: resp.headers,
|
|
9037
|
+
body: {
|
|
9038
|
+
...data,
|
|
9039
|
+
RequestId: resp.event.id,
|
|
9040
|
+
Message: resp.event.event,
|
|
9041
|
+
},
|
|
9042
|
+
}, new $_model.RunMultiDocIntroductionResponse({}));
|
|
9043
|
+
}
|
|
9044
|
+
}
|
|
9045
|
+
|
|
9046
|
+
/**
|
|
9047
|
+
* 文档批量导读
|
|
9048
|
+
*
|
|
9049
|
+
* @param tmpReq - RunMultiDocIntroductionRequest
|
|
9050
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9051
|
+
* @returns RunMultiDocIntroductionResponse
|
|
9052
|
+
*/
|
|
9053
|
+
async runMultiDocIntroductionWithOptions(tmpReq: $_model.RunMultiDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunMultiDocIntroductionResponse> {
|
|
9054
|
+
tmpReq.validate();
|
|
9055
|
+
let request = new $_model.RunMultiDocIntroductionShrinkRequest({ });
|
|
9056
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9057
|
+
if (!$dara.isNull(tmpReq.docIds)) {
|
|
9058
|
+
request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
|
|
9059
|
+
}
|
|
9060
|
+
|
|
9061
|
+
let body : {[key: string ]: any} = { };
|
|
9062
|
+
if (!$dara.isNull(request.docIdsShrink)) {
|
|
9063
|
+
body["DocIds"] = request.docIdsShrink;
|
|
9064
|
+
}
|
|
9065
|
+
|
|
9066
|
+
if (!$dara.isNull(request.keyPointPrompt)) {
|
|
9067
|
+
body["KeyPointPrompt"] = request.keyPointPrompt;
|
|
9068
|
+
}
|
|
9069
|
+
|
|
9070
|
+
if (!$dara.isNull(request.modelName)) {
|
|
9071
|
+
body["ModelName"] = request.modelName;
|
|
9072
|
+
}
|
|
9073
|
+
|
|
9074
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
9075
|
+
body["SessionId"] = request.sessionId;
|
|
9076
|
+
}
|
|
9077
|
+
|
|
9078
|
+
if (!$dara.isNull(request.summaryPrompt)) {
|
|
9079
|
+
body["SummaryPrompt"] = request.summaryPrompt;
|
|
9080
|
+
}
|
|
9081
|
+
|
|
9082
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9083
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9084
|
+
}
|
|
9085
|
+
|
|
9086
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9087
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9088
|
+
});
|
|
9089
|
+
let params = new $OpenApiUtil.Params({
|
|
9090
|
+
action: "RunMultiDocIntroduction",
|
|
9091
|
+
version: "2023-08-01",
|
|
9092
|
+
protocol: "HTTPS",
|
|
9093
|
+
pathname: "/",
|
|
9094
|
+
method: "POST",
|
|
9095
|
+
authType: "AK",
|
|
9096
|
+
style: "RPC",
|
|
9097
|
+
reqBodyType: "formData",
|
|
9098
|
+
bodyType: "json",
|
|
9099
|
+
});
|
|
9100
|
+
return $dara.cast<$_model.RunMultiDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunMultiDocIntroductionResponse({}));
|
|
9101
|
+
}
|
|
9102
|
+
|
|
9103
|
+
/**
|
|
9104
|
+
* 文档批量导读
|
|
9105
|
+
*
|
|
9106
|
+
* @param request - RunMultiDocIntroductionRequest
|
|
9107
|
+
* @returns RunMultiDocIntroductionResponse
|
|
9108
|
+
*/
|
|
9109
|
+
async runMultiDocIntroduction(request: $_model.RunMultiDocIntroductionRequest): Promise<$_model.RunMultiDocIntroductionResponse> {
|
|
9110
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9111
|
+
return await this.runMultiDocIntroductionWithOptions(request, runtime);
|
|
9112
|
+
}
|
|
9113
|
+
|
|
9114
|
+
/**
|
|
9115
|
+
* AI妙搜-智能搜索生成
|
|
9116
|
+
*
|
|
9117
|
+
* @param tmpReq - RunSearchGenerationRequest
|
|
9118
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9119
|
+
* @returns RunSearchGenerationResponse
|
|
9120
|
+
*/
|
|
9121
|
+
async *runSearchGenerationWithSSE(tmpReq: $_model.RunSearchGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSearchGenerationResponse, any, unknown> {
|
|
9122
|
+
tmpReq.validate();
|
|
9123
|
+
let request = new $_model.RunSearchGenerationShrinkRequest({ });
|
|
9124
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9125
|
+
if (!$dara.isNull(tmpReq.agentContext)) {
|
|
9126
|
+
request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
|
|
9127
|
+
}
|
|
9128
|
+
|
|
9129
|
+
if (!$dara.isNull(tmpReq.chatConfig)) {
|
|
9130
|
+
request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
|
|
9131
|
+
}
|
|
9132
|
+
|
|
9133
|
+
let body : {[key: string ]: any} = { };
|
|
9134
|
+
if (!$dara.isNull(request.agentContextShrink)) {
|
|
9135
|
+
body["AgentContext"] = request.agentContextShrink;
|
|
9136
|
+
}
|
|
9137
|
+
|
|
9138
|
+
if (!$dara.isNull(request.chatConfigShrink)) {
|
|
9139
|
+
body["ChatConfig"] = request.chatConfigShrink;
|
|
9140
|
+
}
|
|
9141
|
+
|
|
9142
|
+
if (!$dara.isNull(request.modelId)) {
|
|
9143
|
+
body["ModelId"] = request.modelId;
|
|
9144
|
+
}
|
|
9145
|
+
|
|
9146
|
+
if (!$dara.isNull(request.originalSessionId)) {
|
|
9147
|
+
body["OriginalSessionId"] = request.originalSessionId;
|
|
9148
|
+
}
|
|
9149
|
+
|
|
9150
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9151
|
+
body["Prompt"] = request.prompt;
|
|
9152
|
+
}
|
|
9153
|
+
|
|
9154
|
+
if (!$dara.isNull(request.taskId)) {
|
|
9155
|
+
body["TaskId"] = request.taskId;
|
|
9156
|
+
}
|
|
9157
|
+
|
|
9158
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9159
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9160
|
+
}
|
|
9161
|
+
|
|
9162
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9163
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9164
|
+
});
|
|
9165
|
+
let params = new $OpenApiUtil.Params({
|
|
9166
|
+
action: "RunSearchGeneration",
|
|
9167
|
+
version: "2023-08-01",
|
|
9168
|
+
protocol: "HTTPS",
|
|
9169
|
+
pathname: "/",
|
|
9170
|
+
method: "POST",
|
|
9171
|
+
authType: "AK",
|
|
9172
|
+
style: "RPC",
|
|
9173
|
+
reqBodyType: "formData",
|
|
9174
|
+
bodyType: "json",
|
|
9175
|
+
});
|
|
9176
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9177
|
+
|
|
9178
|
+
for await (let resp of sseResp) {
|
|
9179
|
+
let data = JSON.parse(resp.event.data);
|
|
9180
|
+
yield $dara.cast<$_model.RunSearchGenerationResponse>({
|
|
9181
|
+
statusCode: resp.statusCode,
|
|
9182
|
+
headers: resp.headers,
|
|
9183
|
+
body: {
|
|
9184
|
+
...data,
|
|
9185
|
+
RequestId: resp.event.id,
|
|
9186
|
+
Message: resp.event.event,
|
|
9187
|
+
},
|
|
9188
|
+
}, new $_model.RunSearchGenerationResponse({}));
|
|
9189
|
+
}
|
|
9190
|
+
}
|
|
9191
|
+
|
|
9192
|
+
/**
|
|
9193
|
+
* AI妙搜-智能搜索生成
|
|
9194
|
+
*
|
|
9195
|
+
* @param tmpReq - RunSearchGenerationRequest
|
|
9196
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9197
|
+
* @returns RunSearchGenerationResponse
|
|
9198
|
+
*/
|
|
9199
|
+
async runSearchGenerationWithOptions(tmpReq: $_model.RunSearchGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchGenerationResponse> {
|
|
9200
|
+
tmpReq.validate();
|
|
9201
|
+
let request = new $_model.RunSearchGenerationShrinkRequest({ });
|
|
9202
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9203
|
+
if (!$dara.isNull(tmpReq.agentContext)) {
|
|
9204
|
+
request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
|
|
9205
|
+
}
|
|
9206
|
+
|
|
9207
|
+
if (!$dara.isNull(tmpReq.chatConfig)) {
|
|
9208
|
+
request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
|
|
9209
|
+
}
|
|
9210
|
+
|
|
9211
|
+
let body : {[key: string ]: any} = { };
|
|
9212
|
+
if (!$dara.isNull(request.agentContextShrink)) {
|
|
9213
|
+
body["AgentContext"] = request.agentContextShrink;
|
|
9214
|
+
}
|
|
9215
|
+
|
|
9216
|
+
if (!$dara.isNull(request.chatConfigShrink)) {
|
|
9217
|
+
body["ChatConfig"] = request.chatConfigShrink;
|
|
9218
|
+
}
|
|
9219
|
+
|
|
9220
|
+
if (!$dara.isNull(request.modelId)) {
|
|
9221
|
+
body["ModelId"] = request.modelId;
|
|
9222
|
+
}
|
|
9223
|
+
|
|
9224
|
+
if (!$dara.isNull(request.originalSessionId)) {
|
|
9225
|
+
body["OriginalSessionId"] = request.originalSessionId;
|
|
9226
|
+
}
|
|
9227
|
+
|
|
9228
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9229
|
+
body["Prompt"] = request.prompt;
|
|
9230
|
+
}
|
|
9231
|
+
|
|
9232
|
+
if (!$dara.isNull(request.taskId)) {
|
|
9233
|
+
body["TaskId"] = request.taskId;
|
|
9234
|
+
}
|
|
9235
|
+
|
|
9236
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9237
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9238
|
+
}
|
|
9239
|
+
|
|
9240
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9241
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9242
|
+
});
|
|
9243
|
+
let params = new $OpenApiUtil.Params({
|
|
9244
|
+
action: "RunSearchGeneration",
|
|
9245
|
+
version: "2023-08-01",
|
|
9246
|
+
protocol: "HTTPS",
|
|
9247
|
+
pathname: "/",
|
|
9248
|
+
method: "POST",
|
|
9249
|
+
authType: "AK",
|
|
9250
|
+
style: "RPC",
|
|
9251
|
+
reqBodyType: "formData",
|
|
9252
|
+
bodyType: "json",
|
|
9253
|
+
});
|
|
9254
|
+
return $dara.cast<$_model.RunSearchGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchGenerationResponse({}));
|
|
9255
|
+
}
|
|
9256
|
+
|
|
9257
|
+
/**
|
|
9258
|
+
* AI妙搜-智能搜索生成
|
|
9259
|
+
*
|
|
9260
|
+
* @param request - RunSearchGenerationRequest
|
|
9261
|
+
* @returns RunSearchGenerationResponse
|
|
9262
|
+
*/
|
|
9263
|
+
async runSearchGeneration(request: $_model.RunSearchGenerationRequest): Promise<$_model.RunSearchGenerationResponse> {
|
|
9264
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9265
|
+
return await this.runSearchGenerationWithOptions(request, runtime);
|
|
9266
|
+
}
|
|
9267
|
+
|
|
9268
|
+
/**
|
|
9269
|
+
* 妙搜-文搜文
|
|
9270
|
+
*
|
|
9271
|
+
* @param tmpReq - RunSearchSimilarArticlesRequest
|
|
9272
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9273
|
+
* @returns RunSearchSimilarArticlesResponse
|
|
9274
|
+
*/
|
|
9275
|
+
async *runSearchSimilarArticlesWithSSE(tmpReq: $_model.RunSearchSimilarArticlesRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSearchSimilarArticlesResponse, any, unknown> {
|
|
9276
|
+
tmpReq.validate();
|
|
9277
|
+
let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
|
|
9278
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9279
|
+
if (!$dara.isNull(tmpReq.chatConfig)) {
|
|
9280
|
+
request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
|
|
9281
|
+
}
|
|
9282
|
+
|
|
9283
|
+
let body : {[key: string ]: any} = { };
|
|
9284
|
+
if (!$dara.isNull(request.chatConfigShrink)) {
|
|
9285
|
+
body["ChatConfig"] = request.chatConfigShrink;
|
|
9286
|
+
}
|
|
9287
|
+
|
|
9288
|
+
if (!$dara.isNull(request.docType)) {
|
|
9289
|
+
body["DocType"] = request.docType;
|
|
9290
|
+
}
|
|
9291
|
+
|
|
9292
|
+
if (!$dara.isNull(request.title)) {
|
|
9293
|
+
body["Title"] = request.title;
|
|
9294
|
+
}
|
|
9295
|
+
|
|
9296
|
+
if (!$dara.isNull(request.url)) {
|
|
9297
|
+
body["Url"] = request.url;
|
|
9298
|
+
}
|
|
9299
|
+
|
|
9300
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9301
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9302
|
+
}
|
|
9303
|
+
|
|
9304
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9305
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9306
|
+
});
|
|
9307
|
+
let params = new $OpenApiUtil.Params({
|
|
9308
|
+
action: "RunSearchSimilarArticles",
|
|
9309
|
+
version: "2023-08-01",
|
|
9310
|
+
protocol: "HTTPS",
|
|
9311
|
+
pathname: "/",
|
|
9312
|
+
method: "POST",
|
|
9313
|
+
authType: "AK",
|
|
9314
|
+
style: "RPC",
|
|
9315
|
+
reqBodyType: "formData",
|
|
9316
|
+
bodyType: "json",
|
|
9317
|
+
});
|
|
9318
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9319
|
+
|
|
9320
|
+
for await (let resp of sseResp) {
|
|
9321
|
+
let data = JSON.parse(resp.event.data);
|
|
9322
|
+
yield $dara.cast<$_model.RunSearchSimilarArticlesResponse>({
|
|
9323
|
+
statusCode: resp.statusCode,
|
|
9324
|
+
headers: resp.headers,
|
|
9325
|
+
body: {
|
|
9326
|
+
...data,
|
|
9327
|
+
RequestId: resp.event.id,
|
|
9328
|
+
Message: resp.event.event,
|
|
9329
|
+
},
|
|
9330
|
+
}, new $_model.RunSearchSimilarArticlesResponse({}));
|
|
9331
|
+
}
|
|
9332
|
+
}
|
|
9333
|
+
|
|
9334
|
+
/**
|
|
9335
|
+
* 妙搜-文搜文
|
|
9336
|
+
*
|
|
9337
|
+
* @param tmpReq - RunSearchSimilarArticlesRequest
|
|
9338
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9339
|
+
* @returns RunSearchSimilarArticlesResponse
|
|
9340
|
+
*/
|
|
9341
|
+
async runSearchSimilarArticlesWithOptions(tmpReq: $_model.RunSearchSimilarArticlesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchSimilarArticlesResponse> {
|
|
9342
|
+
tmpReq.validate();
|
|
9343
|
+
let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
|
|
9344
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9345
|
+
if (!$dara.isNull(tmpReq.chatConfig)) {
|
|
9346
|
+
request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
|
|
9347
|
+
}
|
|
9348
|
+
|
|
9349
|
+
let body : {[key: string ]: any} = { };
|
|
9350
|
+
if (!$dara.isNull(request.chatConfigShrink)) {
|
|
9351
|
+
body["ChatConfig"] = request.chatConfigShrink;
|
|
9352
|
+
}
|
|
9353
|
+
|
|
9354
|
+
if (!$dara.isNull(request.docType)) {
|
|
9355
|
+
body["DocType"] = request.docType;
|
|
9356
|
+
}
|
|
9357
|
+
|
|
9358
|
+
if (!$dara.isNull(request.title)) {
|
|
9359
|
+
body["Title"] = request.title;
|
|
9360
|
+
}
|
|
9361
|
+
|
|
9362
|
+
if (!$dara.isNull(request.url)) {
|
|
9363
|
+
body["Url"] = request.url;
|
|
9364
|
+
}
|
|
9365
|
+
|
|
9366
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9367
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9368
|
+
}
|
|
9369
|
+
|
|
9370
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9371
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9372
|
+
});
|
|
9373
|
+
let params = new $OpenApiUtil.Params({
|
|
9374
|
+
action: "RunSearchSimilarArticles",
|
|
9375
|
+
version: "2023-08-01",
|
|
9376
|
+
protocol: "HTTPS",
|
|
9377
|
+
pathname: "/",
|
|
9378
|
+
method: "POST",
|
|
9379
|
+
authType: "AK",
|
|
9380
|
+
style: "RPC",
|
|
9381
|
+
reqBodyType: "formData",
|
|
9382
|
+
bodyType: "json",
|
|
9383
|
+
});
|
|
9384
|
+
return $dara.cast<$_model.RunSearchSimilarArticlesResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchSimilarArticlesResponse({}));
|
|
9385
|
+
}
|
|
9386
|
+
|
|
9387
|
+
/**
|
|
9388
|
+
* 妙搜-文搜文
|
|
9389
|
+
*
|
|
9390
|
+
* @param request - RunSearchSimilarArticlesRequest
|
|
9391
|
+
* @returns RunSearchSimilarArticlesResponse
|
|
9392
|
+
*/
|
|
9393
|
+
async runSearchSimilarArticles(request: $_model.RunSearchSimilarArticlesRequest): Promise<$_model.RunSearchSimilarArticlesResponse> {
|
|
9394
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9395
|
+
return await this.runSearchSimilarArticlesWithOptions(request, runtime);
|
|
9396
|
+
}
|
|
9397
|
+
|
|
9398
|
+
/**
|
|
9399
|
+
* 创作-分步骤写作
|
|
9400
|
+
*
|
|
9401
|
+
* @param tmpReq - RunStepByStepWritingRequest
|
|
9402
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9403
|
+
* @returns RunStepByStepWritingResponse
|
|
9404
|
+
*/
|
|
9405
|
+
async *runStepByStepWritingWithSSE(tmpReq: $_model.RunStepByStepWritingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunStepByStepWritingResponse, any, unknown> {
|
|
9406
|
+
tmpReq.validate();
|
|
9407
|
+
let request = new $_model.RunStepByStepWritingShrinkRequest({ });
|
|
9408
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9409
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
9410
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
9411
|
+
}
|
|
9412
|
+
|
|
9413
|
+
if (!$dara.isNull(tmpReq.writingConfig)) {
|
|
9414
|
+
request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
|
|
9415
|
+
}
|
|
9416
|
+
|
|
9417
|
+
let body : {[key: string ]: any} = { };
|
|
9418
|
+
if (!$dara.isNull(request.originSessionId)) {
|
|
9419
|
+
body["OriginSessionId"] = request.originSessionId;
|
|
9420
|
+
}
|
|
9421
|
+
|
|
9422
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9423
|
+
body["Prompt"] = request.prompt;
|
|
9424
|
+
}
|
|
9425
|
+
|
|
9426
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
9427
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
9428
|
+
}
|
|
9429
|
+
|
|
9430
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
9431
|
+
body["SessionId"] = request.sessionId;
|
|
9432
|
+
}
|
|
9433
|
+
|
|
9434
|
+
if (!$dara.isNull(request.taskId)) {
|
|
9435
|
+
body["TaskId"] = request.taskId;
|
|
9436
|
+
}
|
|
9437
|
+
|
|
9438
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9439
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9440
|
+
}
|
|
9441
|
+
|
|
9442
|
+
if (!$dara.isNull(request.writingConfigShrink)) {
|
|
9443
|
+
body["WritingConfig"] = request.writingConfigShrink;
|
|
9444
|
+
}
|
|
9445
|
+
|
|
9446
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9447
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9448
|
+
});
|
|
9449
|
+
let params = new $OpenApiUtil.Params({
|
|
9450
|
+
action: "RunStepByStepWriting",
|
|
9451
|
+
version: "2023-08-01",
|
|
9452
|
+
protocol: "HTTPS",
|
|
9453
|
+
pathname: "/",
|
|
9454
|
+
method: "POST",
|
|
9455
|
+
authType: "AK",
|
|
9456
|
+
style: "RPC",
|
|
9457
|
+
reqBodyType: "formData",
|
|
9458
|
+
bodyType: "json",
|
|
9459
|
+
});
|
|
9460
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9461
|
+
|
|
9462
|
+
for await (let resp of sseResp) {
|
|
9463
|
+
let data = JSON.parse(resp.event.data);
|
|
9464
|
+
yield $dara.cast<$_model.RunStepByStepWritingResponse>({
|
|
9465
|
+
statusCode: resp.statusCode,
|
|
9466
|
+
headers: resp.headers,
|
|
9467
|
+
body: {
|
|
9468
|
+
...data,
|
|
9469
|
+
RequestId: resp.event.id,
|
|
9470
|
+
Message: resp.event.event,
|
|
9471
|
+
},
|
|
9472
|
+
}, new $_model.RunStepByStepWritingResponse({}));
|
|
9473
|
+
}
|
|
9474
|
+
}
|
|
9475
|
+
|
|
9476
|
+
/**
|
|
9477
|
+
* 创作-分步骤写作
|
|
9478
|
+
*
|
|
9479
|
+
* @param tmpReq - RunStepByStepWritingRequest
|
|
9480
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9481
|
+
* @returns RunStepByStepWritingResponse
|
|
9482
|
+
*/
|
|
9483
|
+
async runStepByStepWritingWithOptions(tmpReq: $_model.RunStepByStepWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStepByStepWritingResponse> {
|
|
9484
|
+
tmpReq.validate();
|
|
9485
|
+
let request = new $_model.RunStepByStepWritingShrinkRequest({ });
|
|
9486
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9487
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
9488
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
9489
|
+
}
|
|
9490
|
+
|
|
9491
|
+
if (!$dara.isNull(tmpReq.writingConfig)) {
|
|
9492
|
+
request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
|
|
9493
|
+
}
|
|
9494
|
+
|
|
9495
|
+
let body : {[key: string ]: any} = { };
|
|
9496
|
+
if (!$dara.isNull(request.originSessionId)) {
|
|
9497
|
+
body["OriginSessionId"] = request.originSessionId;
|
|
9498
|
+
}
|
|
9499
|
+
|
|
9500
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9501
|
+
body["Prompt"] = request.prompt;
|
|
9502
|
+
}
|
|
9503
|
+
|
|
9504
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
9505
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
9506
|
+
}
|
|
9507
|
+
|
|
9508
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
9509
|
+
body["SessionId"] = request.sessionId;
|
|
9510
|
+
}
|
|
9511
|
+
|
|
9512
|
+
if (!$dara.isNull(request.taskId)) {
|
|
9513
|
+
body["TaskId"] = request.taskId;
|
|
9514
|
+
}
|
|
9515
|
+
|
|
9516
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9517
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9518
|
+
}
|
|
9519
|
+
|
|
9520
|
+
if (!$dara.isNull(request.writingConfigShrink)) {
|
|
9521
|
+
body["WritingConfig"] = request.writingConfigShrink;
|
|
9522
|
+
}
|
|
9523
|
+
|
|
9524
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9525
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9526
|
+
});
|
|
9527
|
+
let params = new $OpenApiUtil.Params({
|
|
9528
|
+
action: "RunStepByStepWriting",
|
|
9529
|
+
version: "2023-08-01",
|
|
9530
|
+
protocol: "HTTPS",
|
|
9531
|
+
pathname: "/",
|
|
9532
|
+
method: "POST",
|
|
9533
|
+
authType: "AK",
|
|
9534
|
+
style: "RPC",
|
|
9535
|
+
reqBodyType: "formData",
|
|
9536
|
+
bodyType: "json",
|
|
9537
|
+
});
|
|
9538
|
+
return $dara.cast<$_model.RunStepByStepWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunStepByStepWritingResponse({}));
|
|
9539
|
+
}
|
|
9540
|
+
|
|
9541
|
+
/**
|
|
9542
|
+
* 创作-分步骤写作
|
|
9543
|
+
*
|
|
9544
|
+
* @param request - RunStepByStepWritingRequest
|
|
9545
|
+
* @returns RunStepByStepWritingResponse
|
|
9546
|
+
*/
|
|
9547
|
+
async runStepByStepWriting(request: $_model.RunStepByStepWritingRequest): Promise<$_model.RunStepByStepWritingResponse> {
|
|
9548
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9549
|
+
return await this.runStepByStepWritingWithOptions(request, runtime);
|
|
9550
|
+
}
|
|
9551
|
+
|
|
9552
|
+
/**
|
|
9553
|
+
* 内容特点分析
|
|
9554
|
+
*
|
|
9555
|
+
* @param tmpReq - RunStyleFeatureAnalysisRequest
|
|
9556
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9557
|
+
* @returns RunStyleFeatureAnalysisResponse
|
|
9558
|
+
*/
|
|
9559
|
+
async *runStyleFeatureAnalysisWithSSE(tmpReq: $_model.RunStyleFeatureAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunStyleFeatureAnalysisResponse, any, unknown> {
|
|
9560
|
+
tmpReq.validate();
|
|
9561
|
+
let request = new $_model.RunStyleFeatureAnalysisShrinkRequest({ });
|
|
9562
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9563
|
+
if (!$dara.isNull(tmpReq.contents)) {
|
|
9564
|
+
request.contentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contents, "Contents", "json");
|
|
9565
|
+
}
|
|
9566
|
+
|
|
9567
|
+
if (!$dara.isNull(tmpReq.materialIds)) {
|
|
9568
|
+
request.materialIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.materialIds, "MaterialIds", "json");
|
|
9569
|
+
}
|
|
9570
|
+
|
|
9571
|
+
let body : {[key: string ]: any} = { };
|
|
9572
|
+
if (!$dara.isNull(request.contentsShrink)) {
|
|
9573
|
+
body["Contents"] = request.contentsShrink;
|
|
9574
|
+
}
|
|
9575
|
+
|
|
9576
|
+
if (!$dara.isNull(request.materialIdsShrink)) {
|
|
9577
|
+
body["MaterialIds"] = request.materialIdsShrink;
|
|
9578
|
+
}
|
|
9579
|
+
|
|
9580
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9581
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9582
|
+
}
|
|
9583
|
+
|
|
9584
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9585
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9586
|
+
});
|
|
9587
|
+
let params = new $OpenApiUtil.Params({
|
|
9588
|
+
action: "RunStyleFeatureAnalysis",
|
|
9589
|
+
version: "2023-08-01",
|
|
9590
|
+
protocol: "HTTPS",
|
|
9591
|
+
pathname: "/",
|
|
9592
|
+
method: "POST",
|
|
9593
|
+
authType: "AK",
|
|
9594
|
+
style: "RPC",
|
|
9595
|
+
reqBodyType: "formData",
|
|
9596
|
+
bodyType: "json",
|
|
9597
|
+
});
|
|
9598
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9599
|
+
|
|
9600
|
+
for await (let resp of sseResp) {
|
|
9601
|
+
let data = JSON.parse(resp.event.data);
|
|
9602
|
+
yield $dara.cast<$_model.RunStyleFeatureAnalysisResponse>({
|
|
9603
|
+
statusCode: resp.statusCode,
|
|
9604
|
+
headers: resp.headers,
|
|
9605
|
+
body: {
|
|
9606
|
+
...data,
|
|
9607
|
+
RequestId: resp.event.id,
|
|
9608
|
+
Message: resp.event.event,
|
|
9609
|
+
},
|
|
9610
|
+
}, new $_model.RunStyleFeatureAnalysisResponse({}));
|
|
9611
|
+
}
|
|
9612
|
+
}
|
|
9613
|
+
|
|
9614
|
+
/**
|
|
9615
|
+
* 内容特点分析
|
|
9616
|
+
*
|
|
9617
|
+
* @param tmpReq - RunStyleFeatureAnalysisRequest
|
|
9618
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9619
|
+
* @returns RunStyleFeatureAnalysisResponse
|
|
9620
|
+
*/
|
|
9621
|
+
async runStyleFeatureAnalysisWithOptions(tmpReq: $_model.RunStyleFeatureAnalysisRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStyleFeatureAnalysisResponse> {
|
|
9622
|
+
tmpReq.validate();
|
|
9623
|
+
let request = new $_model.RunStyleFeatureAnalysisShrinkRequest({ });
|
|
9624
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9625
|
+
if (!$dara.isNull(tmpReq.contents)) {
|
|
9626
|
+
request.contentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contents, "Contents", "json");
|
|
9627
|
+
}
|
|
9628
|
+
|
|
9629
|
+
if (!$dara.isNull(tmpReq.materialIds)) {
|
|
9630
|
+
request.materialIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.materialIds, "MaterialIds", "json");
|
|
9631
|
+
}
|
|
9632
|
+
|
|
9633
|
+
let body : {[key: string ]: any} = { };
|
|
9634
|
+
if (!$dara.isNull(request.contentsShrink)) {
|
|
9635
|
+
body["Contents"] = request.contentsShrink;
|
|
9636
|
+
}
|
|
9637
|
+
|
|
9638
|
+
if (!$dara.isNull(request.materialIdsShrink)) {
|
|
9639
|
+
body["MaterialIds"] = request.materialIdsShrink;
|
|
9640
|
+
}
|
|
9641
|
+
|
|
9642
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9643
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9644
|
+
}
|
|
9645
|
+
|
|
9646
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9647
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9648
|
+
});
|
|
9649
|
+
let params = new $OpenApiUtil.Params({
|
|
9650
|
+
action: "RunStyleFeatureAnalysis",
|
|
9651
|
+
version: "2023-08-01",
|
|
9652
|
+
protocol: "HTTPS",
|
|
9653
|
+
pathname: "/",
|
|
9654
|
+
method: "POST",
|
|
9655
|
+
authType: "AK",
|
|
9656
|
+
style: "RPC",
|
|
9657
|
+
reqBodyType: "formData",
|
|
9658
|
+
bodyType: "json",
|
|
9659
|
+
});
|
|
9660
|
+
return $dara.cast<$_model.RunStyleFeatureAnalysisResponse>(await this.callApi(params, req, runtime), new $_model.RunStyleFeatureAnalysisResponse({}));
|
|
9661
|
+
}
|
|
9662
|
+
|
|
9663
|
+
/**
|
|
9664
|
+
* 内容特点分析
|
|
9665
|
+
*
|
|
9666
|
+
* @param request - RunStyleFeatureAnalysisRequest
|
|
9667
|
+
* @returns RunStyleFeatureAnalysisResponse
|
|
9668
|
+
*/
|
|
9669
|
+
async runStyleFeatureAnalysis(request: $_model.RunStyleFeatureAnalysisRequest): Promise<$_model.RunStyleFeatureAnalysisResponse> {
|
|
9670
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9671
|
+
return await this.runStyleFeatureAnalysisWithOptions(request, runtime);
|
|
9672
|
+
}
|
|
9673
|
+
|
|
9674
|
+
/**
|
|
9675
|
+
* 内容摘要生成
|
|
9676
|
+
*
|
|
9677
|
+
* @param request - RunSummaryGenerateRequest
|
|
9678
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9679
|
+
* @returns RunSummaryGenerateResponse
|
|
9680
|
+
*/
|
|
9681
|
+
async *runSummaryGenerateWithSSE(request: $_model.RunSummaryGenerateRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSummaryGenerateResponse, any, unknown> {
|
|
9682
|
+
request.validate();
|
|
9683
|
+
let body : {[key: string ]: any} = { };
|
|
9684
|
+
if (!$dara.isNull(request.content)) {
|
|
9685
|
+
body["Content"] = request.content;
|
|
9686
|
+
}
|
|
9687
|
+
|
|
9688
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9689
|
+
body["Prompt"] = request.prompt;
|
|
9690
|
+
}
|
|
9691
|
+
|
|
9692
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9693
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9694
|
+
}
|
|
9695
|
+
|
|
9696
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9697
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9698
|
+
});
|
|
9699
|
+
let params = new $OpenApiUtil.Params({
|
|
9700
|
+
action: "RunSummaryGenerate",
|
|
9701
|
+
version: "2023-08-01",
|
|
9702
|
+
protocol: "HTTPS",
|
|
9703
|
+
pathname: "/",
|
|
9704
|
+
method: "POST",
|
|
9705
|
+
authType: "AK",
|
|
9706
|
+
style: "RPC",
|
|
9707
|
+
reqBodyType: "formData",
|
|
9708
|
+
bodyType: "json",
|
|
9709
|
+
});
|
|
9710
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
9711
|
+
|
|
9712
|
+
for await (let resp of sseResp) {
|
|
9713
|
+
let data = JSON.parse(resp.event.data);
|
|
9714
|
+
yield $dara.cast<$_model.RunSummaryGenerateResponse>({
|
|
9715
|
+
statusCode: resp.statusCode,
|
|
9716
|
+
headers: resp.headers,
|
|
9717
|
+
body: {
|
|
9718
|
+
...data,
|
|
9719
|
+
RequestId: resp.event.id,
|
|
9720
|
+
Message: resp.event.event,
|
|
9721
|
+
},
|
|
9722
|
+
}, new $_model.RunSummaryGenerateResponse({}));
|
|
9723
|
+
}
|
|
9724
|
+
}
|
|
9725
|
+
|
|
9726
|
+
/**
|
|
9727
|
+
* 内容摘要生成
|
|
9728
|
+
*
|
|
9729
|
+
* @param request - RunSummaryGenerateRequest
|
|
9730
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9731
|
+
* @returns RunSummaryGenerateResponse
|
|
9732
|
+
*/
|
|
9733
|
+
async runSummaryGenerateWithOptions(request: $_model.RunSummaryGenerateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSummaryGenerateResponse> {
|
|
9734
|
+
request.validate();
|
|
9735
|
+
let body : {[key: string ]: any} = { };
|
|
9736
|
+
if (!$dara.isNull(request.content)) {
|
|
9737
|
+
body["Content"] = request.content;
|
|
9738
|
+
}
|
|
9739
|
+
|
|
9740
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9741
|
+
body["Prompt"] = request.prompt;
|
|
9742
|
+
}
|
|
9743
|
+
|
|
9744
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9745
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9749
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9750
|
+
});
|
|
9751
|
+
let params = new $OpenApiUtil.Params({
|
|
9752
|
+
action: "RunSummaryGenerate",
|
|
9753
|
+
version: "2023-08-01",
|
|
9754
|
+
protocol: "HTTPS",
|
|
9755
|
+
pathname: "/",
|
|
9756
|
+
method: "POST",
|
|
9757
|
+
authType: "AK",
|
|
9758
|
+
style: "RPC",
|
|
9759
|
+
reqBodyType: "formData",
|
|
9760
|
+
bodyType: "json",
|
|
9761
|
+
});
|
|
9762
|
+
return $dara.cast<$_model.RunSummaryGenerateResponse>(await this.callApi(params, req, runtime), new $_model.RunSummaryGenerateResponse({}));
|
|
9763
|
+
}
|
|
9764
|
+
|
|
9765
|
+
/**
|
|
9766
|
+
* 内容摘要生成
|
|
9767
|
+
*
|
|
9768
|
+
* @param request - RunSummaryGenerateRequest
|
|
9769
|
+
* @returns RunSummaryGenerateResponse
|
|
9770
|
+
*/
|
|
9771
|
+
async runSummaryGenerate(request: $_model.RunSummaryGenerateRequest): Promise<$_model.RunSummaryGenerateResponse> {
|
|
9772
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9773
|
+
return await this.runSummaryGenerateWithOptions(request, runtime);
|
|
9774
|
+
}
|
|
9775
|
+
|
|
9776
|
+
/**
|
|
9777
|
+
* 创作-文本润色
|
|
9778
|
+
*
|
|
9779
|
+
* @param request - RunTextPolishingRequest
|
|
9780
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9781
|
+
* @returns RunTextPolishingResponse
|
|
9782
|
+
*/
|
|
9783
|
+
async *runTextPolishingWithSSE(request: $_model.RunTextPolishingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTextPolishingResponse, any, unknown> {
|
|
9784
|
+
request.validate();
|
|
9785
|
+
let body : {[key: string ]: any} = { };
|
|
9786
|
+
if (!$dara.isNull(request.content)) {
|
|
9787
|
+
body["Content"] = request.content;
|
|
9788
|
+
}
|
|
9789
|
+
|
|
9790
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9791
|
+
body["Prompt"] = request.prompt;
|
|
7696
9792
|
}
|
|
7697
9793
|
|
|
7698
9794
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -7703,7 +9799,7 @@ export default class Client extends OpenApi {
|
|
|
7703
9799
|
body: OpenApiUtil.parseToMap(body),
|
|
7704
9800
|
});
|
|
7705
9801
|
let params = new $OpenApiUtil.Params({
|
|
7706
|
-
action: "
|
|
9802
|
+
action: "RunTextPolishing",
|
|
7707
9803
|
version: "2023-08-01",
|
|
7708
9804
|
protocol: "HTTPS",
|
|
7709
9805
|
pathname: "/",
|
|
@@ -7713,50 +9809,38 @@ export default class Client extends OpenApi {
|
|
|
7713
9809
|
reqBodyType: "formData",
|
|
7714
9810
|
bodyType: "json",
|
|
7715
9811
|
});
|
|
7716
|
-
|
|
7717
|
-
}
|
|
9812
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7718
9813
|
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
9814
|
+
for await (let resp of sseResp) {
|
|
9815
|
+
let data = JSON.parse(resp.event.data);
|
|
9816
|
+
yield $dara.cast<$_model.RunTextPolishingResponse>({
|
|
9817
|
+
statusCode: resp.statusCode,
|
|
9818
|
+
headers: resp.headers,
|
|
9819
|
+
body: {
|
|
9820
|
+
...data,
|
|
9821
|
+
RequestId: resp.event.id,
|
|
9822
|
+
Message: resp.event.event,
|
|
9823
|
+
},
|
|
9824
|
+
}, new $_model.RunTextPolishingResponse({}));
|
|
9825
|
+
}
|
|
7728
9826
|
}
|
|
7729
9827
|
|
|
7730
9828
|
/**
|
|
7731
|
-
*
|
|
9829
|
+
* 创作-文本润色
|
|
7732
9830
|
*
|
|
7733
|
-
* @param
|
|
9831
|
+
* @param request - RunTextPolishingRequest
|
|
7734
9832
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7735
|
-
* @returns
|
|
9833
|
+
* @returns RunTextPolishingResponse
|
|
7736
9834
|
*/
|
|
7737
|
-
async
|
|
7738
|
-
|
|
7739
|
-
let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
|
|
7740
|
-
OpenApiUtil.convert(tmpReq, request);
|
|
7741
|
-
if (!$dara.isNull(tmpReq.chatConfig)) {
|
|
7742
|
-
request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
|
|
7743
|
-
}
|
|
7744
|
-
|
|
9835
|
+
async runTextPolishingWithOptions(request: $_model.RunTextPolishingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTextPolishingResponse> {
|
|
9836
|
+
request.validate();
|
|
7745
9837
|
let body : {[key: string ]: any} = { };
|
|
7746
|
-
if (!$dara.isNull(request.
|
|
7747
|
-
body["
|
|
7748
|
-
}
|
|
7749
|
-
|
|
7750
|
-
if (!$dara.isNull(request.docType)) {
|
|
7751
|
-
body["DocType"] = request.docType;
|
|
7752
|
-
}
|
|
7753
|
-
|
|
7754
|
-
if (!$dara.isNull(request.title)) {
|
|
7755
|
-
body["Title"] = request.title;
|
|
9838
|
+
if (!$dara.isNull(request.content)) {
|
|
9839
|
+
body["Content"] = request.content;
|
|
7756
9840
|
}
|
|
7757
9841
|
|
|
7758
|
-
if (!$dara.isNull(request.
|
|
7759
|
-
body["
|
|
9842
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9843
|
+
body["Prompt"] = request.prompt;
|
|
7760
9844
|
}
|
|
7761
9845
|
|
|
7762
9846
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -7767,7 +9851,7 @@ export default class Client extends OpenApi {
|
|
|
7767
9851
|
body: OpenApiUtil.parseToMap(body),
|
|
7768
9852
|
});
|
|
7769
9853
|
let params = new $OpenApiUtil.Params({
|
|
7770
|
-
action: "
|
|
9854
|
+
action: "RunTextPolishing",
|
|
7771
9855
|
version: "2023-08-01",
|
|
7772
9856
|
protocol: "HTTPS",
|
|
7773
9857
|
pathname: "/",
|
|
@@ -7777,73 +9861,65 @@ export default class Client extends OpenApi {
|
|
|
7777
9861
|
reqBodyType: "formData",
|
|
7778
9862
|
bodyType: "json",
|
|
7779
9863
|
});
|
|
7780
|
-
return $dara.cast<$_model.
|
|
9864
|
+
return $dara.cast<$_model.RunTextPolishingResponse>(await this.callApi(params, req, runtime), new $_model.RunTextPolishingResponse({}));
|
|
7781
9865
|
}
|
|
7782
9866
|
|
|
7783
9867
|
/**
|
|
7784
|
-
*
|
|
9868
|
+
* 创作-文本润色
|
|
7785
9869
|
*
|
|
7786
|
-
* @param request -
|
|
7787
|
-
* @returns
|
|
9870
|
+
* @param request - RunTextPolishingRequest
|
|
9871
|
+
* @returns RunTextPolishingResponse
|
|
7788
9872
|
*/
|
|
7789
|
-
async
|
|
9873
|
+
async runTextPolishing(request: $_model.RunTextPolishingRequest): Promise<$_model.RunTextPolishingResponse> {
|
|
7790
9874
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7791
|
-
return await this.
|
|
9875
|
+
return await this.runTextPolishingWithOptions(request, runtime);
|
|
7792
9876
|
}
|
|
7793
9877
|
|
|
7794
9878
|
/**
|
|
7795
|
-
*
|
|
9879
|
+
* 妙笔:标题生成
|
|
7796
9880
|
*
|
|
7797
|
-
* @param tmpReq -
|
|
9881
|
+
* @param tmpReq - RunTitleGenerationRequest
|
|
7798
9882
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7799
|
-
* @returns
|
|
9883
|
+
* @returns RunTitleGenerationResponse
|
|
7800
9884
|
*/
|
|
7801
|
-
async
|
|
9885
|
+
async *runTitleGenerationWithSSE(tmpReq: $_model.RunTitleGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTitleGenerationResponse, any, unknown> {
|
|
7802
9886
|
tmpReq.validate();
|
|
7803
|
-
let request = new $_model.
|
|
9887
|
+
let request = new $_model.RunTitleGenerationShrinkRequest({ });
|
|
7804
9888
|
OpenApiUtil.convert(tmpReq, request);
|
|
7805
|
-
if (!$dara.isNull(tmpReq.
|
|
7806
|
-
request.
|
|
9889
|
+
if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
|
|
9890
|
+
request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
|
|
7807
9891
|
}
|
|
7808
9892
|
|
|
7809
|
-
if (!$dara.isNull(tmpReq.
|
|
7810
|
-
request.
|
|
9893
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
9894
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
7811
9895
|
}
|
|
7812
9896
|
|
|
7813
9897
|
let body : {[key: string ]: any} = { };
|
|
7814
|
-
if (!$dara.isNull(request.
|
|
7815
|
-
body["
|
|
7816
|
-
}
|
|
7817
|
-
|
|
7818
|
-
if (!$dara.isNull(request.prompt)) {
|
|
7819
|
-
body["Prompt"] = request.prompt;
|
|
9898
|
+
if (!$dara.isNull(request.deduplicatedTitlesShrink)) {
|
|
9899
|
+
body["DeduplicatedTitles"] = request.deduplicatedTitlesShrink;
|
|
7820
9900
|
}
|
|
7821
9901
|
|
|
7822
9902
|
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
7823
9903
|
body["ReferenceData"] = request.referenceDataShrink;
|
|
7824
9904
|
}
|
|
7825
9905
|
|
|
7826
|
-
if (!$dara.isNull(request.sessionId)) {
|
|
7827
|
-
body["SessionId"] = request.sessionId;
|
|
7828
|
-
}
|
|
7829
|
-
|
|
7830
9906
|
if (!$dara.isNull(request.taskId)) {
|
|
7831
9907
|
body["TaskId"] = request.taskId;
|
|
7832
9908
|
}
|
|
7833
9909
|
|
|
7834
|
-
if (!$dara.isNull(request.
|
|
7835
|
-
body["
|
|
9910
|
+
if (!$dara.isNull(request.titleCount)) {
|
|
9911
|
+
body["TitleCount"] = request.titleCount;
|
|
7836
9912
|
}
|
|
7837
9913
|
|
|
7838
|
-
if (!$dara.isNull(request.
|
|
7839
|
-
body["
|
|
9914
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
9915
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
7840
9916
|
}
|
|
7841
9917
|
|
|
7842
9918
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
7843
9919
|
body: OpenApiUtil.parseToMap(body),
|
|
7844
9920
|
});
|
|
7845
9921
|
let params = new $OpenApiUtil.Params({
|
|
7846
|
-
action: "
|
|
9922
|
+
action: "RunTitleGeneration",
|
|
7847
9923
|
version: "2023-08-01",
|
|
7848
9924
|
protocol: "HTTPS",
|
|
7849
9925
|
pathname: "/",
|
|
@@ -7853,46 +9929,56 @@ export default class Client extends OpenApi {
|
|
|
7853
9929
|
reqBodyType: "formData",
|
|
7854
9930
|
bodyType: "json",
|
|
7855
9931
|
});
|
|
7856
|
-
|
|
7857
|
-
}
|
|
9932
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7858
9933
|
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
9934
|
+
for await (let resp of sseResp) {
|
|
9935
|
+
let data = JSON.parse(resp.event.data);
|
|
9936
|
+
yield $dara.cast<$_model.RunTitleGenerationResponse>({
|
|
9937
|
+
statusCode: resp.statusCode,
|
|
9938
|
+
headers: resp.headers,
|
|
9939
|
+
body: {
|
|
9940
|
+
...data,
|
|
9941
|
+
RequestId: resp.event.id,
|
|
9942
|
+
Message: resp.event.event,
|
|
9943
|
+
},
|
|
9944
|
+
}, new $_model.RunTitleGenerationResponse({}));
|
|
9945
|
+
}
|
|
7868
9946
|
}
|
|
7869
9947
|
|
|
7870
9948
|
/**
|
|
7871
|
-
*
|
|
9949
|
+
* 妙笔:标题生成
|
|
7872
9950
|
*
|
|
7873
|
-
* @param tmpReq -
|
|
9951
|
+
* @param tmpReq - RunTitleGenerationRequest
|
|
7874
9952
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7875
|
-
* @returns
|
|
9953
|
+
* @returns RunTitleGenerationResponse
|
|
7876
9954
|
*/
|
|
7877
|
-
async
|
|
9955
|
+
async runTitleGenerationWithOptions(tmpReq: $_model.RunTitleGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTitleGenerationResponse> {
|
|
7878
9956
|
tmpReq.validate();
|
|
7879
|
-
let request = new $_model.
|
|
9957
|
+
let request = new $_model.RunTitleGenerationShrinkRequest({ });
|
|
7880
9958
|
OpenApiUtil.convert(tmpReq, request);
|
|
7881
|
-
if (!$dara.isNull(tmpReq.
|
|
7882
|
-
request.
|
|
9959
|
+
if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
|
|
9960
|
+
request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
|
|
7883
9961
|
}
|
|
7884
9962
|
|
|
7885
|
-
if (!$dara.isNull(tmpReq.
|
|
7886
|
-
request.
|
|
9963
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
9964
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
7887
9965
|
}
|
|
7888
9966
|
|
|
7889
9967
|
let body : {[key: string ]: any} = { };
|
|
7890
|
-
if (!$dara.isNull(request.
|
|
7891
|
-
body["
|
|
9968
|
+
if (!$dara.isNull(request.deduplicatedTitlesShrink)) {
|
|
9969
|
+
body["DeduplicatedTitles"] = request.deduplicatedTitlesShrink;
|
|
7892
9970
|
}
|
|
7893
9971
|
|
|
7894
|
-
if (!$dara.isNull(request.
|
|
7895
|
-
body["
|
|
9972
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
9973
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
9974
|
+
}
|
|
9975
|
+
|
|
9976
|
+
if (!$dara.isNull(request.taskId)) {
|
|
9977
|
+
body["TaskId"] = request.taskId;
|
|
9978
|
+
}
|
|
9979
|
+
|
|
9980
|
+
if (!$dara.isNull(request.titleCount)) {
|
|
9981
|
+
body["TitleCount"] = request.titleCount;
|
|
7896
9982
|
}
|
|
7897
9983
|
|
|
7898
9984
|
if (!$dara.isNull(request.workspaceId)) {
|
|
@@ -7903,7 +9989,7 @@ export default class Client extends OpenApi {
|
|
|
7903
9989
|
body: OpenApiUtil.parseToMap(body),
|
|
7904
9990
|
});
|
|
7905
9991
|
let params = new $OpenApiUtil.Params({
|
|
7906
|
-
action: "
|
|
9992
|
+
action: "RunTitleGeneration",
|
|
7907
9993
|
version: "2023-08-01",
|
|
7908
9994
|
protocol: "HTTPS",
|
|
7909
9995
|
pathname: "/",
|
|
@@ -7913,38 +9999,48 @@ export default class Client extends OpenApi {
|
|
|
7913
9999
|
reqBodyType: "formData",
|
|
7914
10000
|
bodyType: "json",
|
|
7915
10001
|
});
|
|
7916
|
-
return $dara.cast<$_model.
|
|
10002
|
+
return $dara.cast<$_model.RunTitleGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTitleGenerationResponse({}));
|
|
7917
10003
|
}
|
|
7918
10004
|
|
|
7919
10005
|
/**
|
|
7920
|
-
*
|
|
10006
|
+
* 妙笔:标题生成
|
|
7921
10007
|
*
|
|
7922
|
-
* @param request -
|
|
7923
|
-
* @returns
|
|
10008
|
+
* @param request - RunTitleGenerationRequest
|
|
10009
|
+
* @returns RunTitleGenerationResponse
|
|
7924
10010
|
*/
|
|
7925
|
-
async
|
|
10011
|
+
async runTitleGeneration(request: $_model.RunTitleGenerationRequest): Promise<$_model.RunTitleGenerationResponse> {
|
|
7926
10012
|
let runtime = new $dara.RuntimeOptions({ });
|
|
7927
|
-
return await this.
|
|
10013
|
+
return await this.runTitleGenerationWithOptions(request, runtime);
|
|
7928
10014
|
}
|
|
7929
10015
|
|
|
7930
10016
|
/**
|
|
7931
|
-
*
|
|
10017
|
+
* AI妙笔-创作-中英文翻译
|
|
7932
10018
|
*
|
|
7933
|
-
* @param
|
|
10019
|
+
* @param tmpReq - RunTranslateGenerationRequest
|
|
7934
10020
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7935
|
-
* @returns
|
|
10021
|
+
* @returns RunTranslateGenerationResponse
|
|
7936
10022
|
*/
|
|
7937
|
-
async
|
|
7938
|
-
|
|
7939
|
-
let
|
|
7940
|
-
|
|
7941
|
-
|
|
10023
|
+
async *runTranslateGenerationWithSSE(tmpReq: $_model.RunTranslateGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTranslateGenerationResponse, any, unknown> {
|
|
10024
|
+
tmpReq.validate();
|
|
10025
|
+
let request = new $_model.RunTranslateGenerationShrinkRequest({ });
|
|
10026
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
10027
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
10028
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
7942
10029
|
}
|
|
7943
10030
|
|
|
10031
|
+
let body : {[key: string ]: any} = { };
|
|
7944
10032
|
if (!$dara.isNull(request.prompt)) {
|
|
7945
10033
|
body["Prompt"] = request.prompt;
|
|
7946
10034
|
}
|
|
7947
10035
|
|
|
10036
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
10037
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
10038
|
+
}
|
|
10039
|
+
|
|
10040
|
+
if (!$dara.isNull(request.taskId)) {
|
|
10041
|
+
body["TaskId"] = request.taskId;
|
|
10042
|
+
}
|
|
10043
|
+
|
|
7948
10044
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7949
10045
|
body["WorkspaceId"] = request.workspaceId;
|
|
7950
10046
|
}
|
|
@@ -7953,7 +10049,7 @@ export default class Client extends OpenApi {
|
|
|
7953
10049
|
body: OpenApiUtil.parseToMap(body),
|
|
7954
10050
|
});
|
|
7955
10051
|
let params = new $OpenApiUtil.Params({
|
|
7956
|
-
action: "
|
|
10052
|
+
action: "RunTranslateGeneration",
|
|
7957
10053
|
version: "2023-08-01",
|
|
7958
10054
|
protocol: "HTTPS",
|
|
7959
10055
|
pathname: "/",
|
|
@@ -7963,38 +10059,50 @@ export default class Client extends OpenApi {
|
|
|
7963
10059
|
reqBodyType: "formData",
|
|
7964
10060
|
bodyType: "json",
|
|
7965
10061
|
});
|
|
7966
|
-
|
|
7967
|
-
}
|
|
10062
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
7968
10063
|
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
10064
|
+
for await (let resp of sseResp) {
|
|
10065
|
+
let data = JSON.parse(resp.event.data);
|
|
10066
|
+
yield $dara.cast<$_model.RunTranslateGenerationResponse>({
|
|
10067
|
+
statusCode: resp.statusCode,
|
|
10068
|
+
headers: resp.headers,
|
|
10069
|
+
body: {
|
|
10070
|
+
...data,
|
|
10071
|
+
RequestId: resp.event.id,
|
|
10072
|
+
Message: resp.event.event,
|
|
10073
|
+
},
|
|
10074
|
+
}, new $_model.RunTranslateGenerationResponse({}));
|
|
10075
|
+
}
|
|
7978
10076
|
}
|
|
7979
10077
|
|
|
7980
10078
|
/**
|
|
7981
|
-
*
|
|
10079
|
+
* AI妙笔-创作-中英文翻译
|
|
7982
10080
|
*
|
|
7983
|
-
* @param
|
|
10081
|
+
* @param tmpReq - RunTranslateGenerationRequest
|
|
7984
10082
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
7985
|
-
* @returns
|
|
10083
|
+
* @returns RunTranslateGenerationResponse
|
|
7986
10084
|
*/
|
|
7987
|
-
async
|
|
7988
|
-
|
|
7989
|
-
let
|
|
7990
|
-
|
|
7991
|
-
|
|
10085
|
+
async runTranslateGenerationWithOptions(tmpReq: $_model.RunTranslateGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTranslateGenerationResponse> {
|
|
10086
|
+
tmpReq.validate();
|
|
10087
|
+
let request = new $_model.RunTranslateGenerationShrinkRequest({ });
|
|
10088
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
10089
|
+
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
10090
|
+
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
7992
10091
|
}
|
|
7993
10092
|
|
|
10093
|
+
let body : {[key: string ]: any} = { };
|
|
7994
10094
|
if (!$dara.isNull(request.prompt)) {
|
|
7995
10095
|
body["Prompt"] = request.prompt;
|
|
7996
10096
|
}
|
|
7997
10097
|
|
|
10098
|
+
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
10099
|
+
body["ReferenceData"] = request.referenceDataShrink;
|
|
10100
|
+
}
|
|
10101
|
+
|
|
10102
|
+
if (!$dara.isNull(request.taskId)) {
|
|
10103
|
+
body["TaskId"] = request.taskId;
|
|
10104
|
+
}
|
|
10105
|
+
|
|
7998
10106
|
if (!$dara.isNull(request.workspaceId)) {
|
|
7999
10107
|
body["WorkspaceId"] = request.workspaceId;
|
|
8000
10108
|
}
|
|
@@ -8003,7 +10111,7 @@ export default class Client extends OpenApi {
|
|
|
8003
10111
|
body: OpenApiUtil.parseToMap(body),
|
|
8004
10112
|
});
|
|
8005
10113
|
let params = new $OpenApiUtil.Params({
|
|
8006
|
-
action: "
|
|
10114
|
+
action: "RunTranslateGeneration",
|
|
8007
10115
|
version: "2023-08-01",
|
|
8008
10116
|
protocol: "HTTPS",
|
|
8009
10117
|
pathname: "/",
|
|
@@ -8013,42 +10121,38 @@ export default class Client extends OpenApi {
|
|
|
8013
10121
|
reqBodyType: "formData",
|
|
8014
10122
|
bodyType: "json",
|
|
8015
10123
|
});
|
|
8016
|
-
return $dara.cast<$_model.
|
|
10124
|
+
return $dara.cast<$_model.RunTranslateGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTranslateGenerationResponse({}));
|
|
8017
10125
|
}
|
|
8018
10126
|
|
|
8019
10127
|
/**
|
|
8020
|
-
*
|
|
10128
|
+
* AI妙笔-创作-中英文翻译
|
|
8021
10129
|
*
|
|
8022
|
-
* @param request -
|
|
8023
|
-
* @returns
|
|
10130
|
+
* @param request - RunTranslateGenerationRequest
|
|
10131
|
+
* @returns RunTranslateGenerationResponse
|
|
8024
10132
|
*/
|
|
8025
|
-
async
|
|
10133
|
+
async runTranslateGeneration(request: $_model.RunTranslateGenerationRequest): Promise<$_model.RunTranslateGenerationResponse> {
|
|
8026
10134
|
let runtime = new $dara.RuntimeOptions({ });
|
|
8027
|
-
return await this.
|
|
10135
|
+
return await this.runTranslateGenerationWithOptions(request, runtime);
|
|
8028
10136
|
}
|
|
8029
10137
|
|
|
8030
10138
|
/**
|
|
8031
|
-
*
|
|
10139
|
+
* AI妙笔-创作-文风改写
|
|
8032
10140
|
*
|
|
8033
|
-
* @param tmpReq -
|
|
10141
|
+
* @param tmpReq - RunWriteToneGenerationRequest
|
|
8034
10142
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
8035
|
-
* @returns
|
|
10143
|
+
* @returns RunWriteToneGenerationResponse
|
|
8036
10144
|
*/
|
|
8037
|
-
async
|
|
10145
|
+
async *runWriteToneGenerationWithSSE(tmpReq: $_model.RunWriteToneGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWriteToneGenerationResponse, any, unknown> {
|
|
8038
10146
|
tmpReq.validate();
|
|
8039
|
-
let request = new $_model.
|
|
10147
|
+
let request = new $_model.RunWriteToneGenerationShrinkRequest({ });
|
|
8040
10148
|
OpenApiUtil.convert(tmpReq, request);
|
|
8041
|
-
if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
|
|
8042
|
-
request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
|
|
8043
|
-
}
|
|
8044
|
-
|
|
8045
10149
|
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
8046
10150
|
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
8047
10151
|
}
|
|
8048
10152
|
|
|
8049
|
-
let body : {[key: string ]: any} = { };
|
|
8050
|
-
if (!$dara.isNull(request.
|
|
8051
|
-
body["
|
|
10153
|
+
let body : {[key: string ]: any} = { };
|
|
10154
|
+
if (!$dara.isNull(request.prompt)) {
|
|
10155
|
+
body["Prompt"] = request.prompt;
|
|
8052
10156
|
}
|
|
8053
10157
|
|
|
8054
10158
|
if (!$dara.isNull(request.referenceDataShrink)) {
|
|
@@ -8059,10 +10163,6 @@ export default class Client extends OpenApi {
|
|
|
8059
10163
|
body["TaskId"] = request.taskId;
|
|
8060
10164
|
}
|
|
8061
10165
|
|
|
8062
|
-
if (!$dara.isNull(request.titleCount)) {
|
|
8063
|
-
body["TitleCount"] = request.titleCount;
|
|
8064
|
-
}
|
|
8065
|
-
|
|
8066
10166
|
if (!$dara.isNull(request.workspaceId)) {
|
|
8067
10167
|
body["WorkspaceId"] = request.workspaceId;
|
|
8068
10168
|
}
|
|
@@ -8071,7 +10171,7 @@ export default class Client extends OpenApi {
|
|
|
8071
10171
|
body: OpenApiUtil.parseToMap(body),
|
|
8072
10172
|
});
|
|
8073
10173
|
let params = new $OpenApiUtil.Params({
|
|
8074
|
-
action: "
|
|
10174
|
+
action: "RunWriteToneGeneration",
|
|
8075
10175
|
version: "2023-08-01",
|
|
8076
10176
|
protocol: "HTTPS",
|
|
8077
10177
|
pathname: "/",
|
|
@@ -8081,30 +10181,32 @@ export default class Client extends OpenApi {
|
|
|
8081
10181
|
reqBodyType: "formData",
|
|
8082
10182
|
bodyType: "json",
|
|
8083
10183
|
});
|
|
8084
|
-
|
|
8085
|
-
}
|
|
10184
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8086
10185
|
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
10186
|
+
for await (let resp of sseResp) {
|
|
10187
|
+
let data = JSON.parse(resp.event.data);
|
|
10188
|
+
yield $dara.cast<$_model.RunWriteToneGenerationResponse>({
|
|
10189
|
+
statusCode: resp.statusCode,
|
|
10190
|
+
headers: resp.headers,
|
|
10191
|
+
body: {
|
|
10192
|
+
...data,
|
|
10193
|
+
RequestId: resp.event.id,
|
|
10194
|
+
Message: resp.event.event,
|
|
10195
|
+
},
|
|
10196
|
+
}, new $_model.RunWriteToneGenerationResponse({}));
|
|
10197
|
+
}
|
|
8096
10198
|
}
|
|
8097
10199
|
|
|
8098
10200
|
/**
|
|
8099
|
-
* AI
|
|
10201
|
+
* AI妙笔-创作-文风改写
|
|
8100
10202
|
*
|
|
8101
|
-
* @param tmpReq -
|
|
10203
|
+
* @param tmpReq - RunWriteToneGenerationRequest
|
|
8102
10204
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
8103
|
-
* @returns
|
|
10205
|
+
* @returns RunWriteToneGenerationResponse
|
|
8104
10206
|
*/
|
|
8105
|
-
async
|
|
10207
|
+
async runWriteToneGenerationWithOptions(tmpReq: $_model.RunWriteToneGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunWriteToneGenerationResponse> {
|
|
8106
10208
|
tmpReq.validate();
|
|
8107
|
-
let request = new $_model.
|
|
10209
|
+
let request = new $_model.RunWriteToneGenerationShrinkRequest({ });
|
|
8108
10210
|
OpenApiUtil.convert(tmpReq, request);
|
|
8109
10211
|
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
8110
10212
|
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
@@ -8131,7 +10233,7 @@ export default class Client extends OpenApi {
|
|
|
8131
10233
|
body: OpenApiUtil.parseToMap(body),
|
|
8132
10234
|
});
|
|
8133
10235
|
let params = new $OpenApiUtil.Params({
|
|
8134
|
-
action: "
|
|
10236
|
+
action: "RunWriteToneGeneration",
|
|
8135
10237
|
version: "2023-08-01",
|
|
8136
10238
|
protocol: "HTTPS",
|
|
8137
10239
|
pathname: "/",
|
|
@@ -8141,36 +10243,44 @@ export default class Client extends OpenApi {
|
|
|
8141
10243
|
reqBodyType: "formData",
|
|
8142
10244
|
bodyType: "json",
|
|
8143
10245
|
});
|
|
8144
|
-
return $dara.cast<$_model.
|
|
10246
|
+
return $dara.cast<$_model.RunWriteToneGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunWriteToneGenerationResponse({}));
|
|
8145
10247
|
}
|
|
8146
10248
|
|
|
8147
10249
|
/**
|
|
8148
|
-
* AI
|
|
10250
|
+
* AI妙笔-创作-文风改写
|
|
8149
10251
|
*
|
|
8150
|
-
* @param request -
|
|
8151
|
-
* @returns
|
|
10252
|
+
* @param request - RunWriteToneGenerationRequest
|
|
10253
|
+
* @returns RunWriteToneGenerationResponse
|
|
8152
10254
|
*/
|
|
8153
|
-
async
|
|
10255
|
+
async runWriteToneGeneration(request: $_model.RunWriteToneGenerationRequest): Promise<$_model.RunWriteToneGenerationResponse> {
|
|
8154
10256
|
let runtime = new $dara.RuntimeOptions({ });
|
|
8155
|
-
return await this.
|
|
10257
|
+
return await this.runWriteToneGenerationWithOptions(request, runtime);
|
|
8156
10258
|
}
|
|
8157
10259
|
|
|
8158
10260
|
/**
|
|
8159
|
-
*
|
|
10261
|
+
* 直接写作
|
|
8160
10262
|
*
|
|
8161
|
-
* @param tmpReq -
|
|
10263
|
+
* @param tmpReq - RunWritingRequest
|
|
8162
10264
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
8163
|
-
* @returns
|
|
10265
|
+
* @returns RunWritingResponse
|
|
8164
10266
|
*/
|
|
8165
|
-
async
|
|
10267
|
+
async *runWritingWithSSE(tmpReq: $_model.RunWritingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWritingResponse, any, unknown> {
|
|
8166
10268
|
tmpReq.validate();
|
|
8167
|
-
let request = new $_model.
|
|
10269
|
+
let request = new $_model.RunWritingShrinkRequest({ });
|
|
8168
10270
|
OpenApiUtil.convert(tmpReq, request);
|
|
8169
10271
|
if (!$dara.isNull(tmpReq.referenceData)) {
|
|
8170
10272
|
request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
|
|
8171
10273
|
}
|
|
8172
10274
|
|
|
10275
|
+
if (!$dara.isNull(tmpReq.writingConfig)) {
|
|
10276
|
+
request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
|
|
10277
|
+
}
|
|
10278
|
+
|
|
8173
10279
|
let body : {[key: string ]: any} = { };
|
|
10280
|
+
if (!$dara.isNull(request.originSessionId)) {
|
|
10281
|
+
body["OriginSessionId"] = request.originSessionId;
|
|
10282
|
+
}
|
|
10283
|
+
|
|
8174
10284
|
if (!$dara.isNull(request.prompt)) {
|
|
8175
10285
|
body["Prompt"] = request.prompt;
|
|
8176
10286
|
}
|
|
@@ -8179,6 +10289,10 @@ export default class Client extends OpenApi {
|
|
|
8179
10289
|
body["ReferenceData"] = request.referenceDataShrink;
|
|
8180
10290
|
}
|
|
8181
10291
|
|
|
10292
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
10293
|
+
body["SessionId"] = request.sessionId;
|
|
10294
|
+
}
|
|
10295
|
+
|
|
8182
10296
|
if (!$dara.isNull(request.taskId)) {
|
|
8183
10297
|
body["TaskId"] = request.taskId;
|
|
8184
10298
|
}
|
|
@@ -8187,11 +10301,15 @@ export default class Client extends OpenApi {
|
|
|
8187
10301
|
body["WorkspaceId"] = request.workspaceId;
|
|
8188
10302
|
}
|
|
8189
10303
|
|
|
10304
|
+
if (!$dara.isNull(request.writingConfigShrink)) {
|
|
10305
|
+
body["WritingConfig"] = request.writingConfigShrink;
|
|
10306
|
+
}
|
|
10307
|
+
|
|
8190
10308
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
8191
10309
|
body: OpenApiUtil.parseToMap(body),
|
|
8192
10310
|
});
|
|
8193
10311
|
let params = new $OpenApiUtil.Params({
|
|
8194
|
-
action: "
|
|
10312
|
+
action: "RunWriting",
|
|
8195
10313
|
version: "2023-08-01",
|
|
8196
10314
|
protocol: "HTTPS",
|
|
8197
10315
|
pathname: "/",
|
|
@@ -8201,18 +10319,20 @@ export default class Client extends OpenApi {
|
|
|
8201
10319
|
reqBodyType: "formData",
|
|
8202
10320
|
bodyType: "json",
|
|
8203
10321
|
});
|
|
8204
|
-
|
|
8205
|
-
}
|
|
10322
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
8206
10323
|
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
10324
|
+
for await (let resp of sseResp) {
|
|
10325
|
+
let data = JSON.parse(resp.event.data);
|
|
10326
|
+
yield $dara.cast<$_model.RunWritingResponse>({
|
|
10327
|
+
statusCode: resp.statusCode,
|
|
10328
|
+
headers: resp.headers,
|
|
10329
|
+
body: {
|
|
10330
|
+
...data,
|
|
10331
|
+
RequestId: resp.event.id,
|
|
10332
|
+
Message: resp.event.event,
|
|
10333
|
+
},
|
|
10334
|
+
}, new $_model.RunWritingResponse({}));
|
|
10335
|
+
}
|
|
8216
10336
|
}
|
|
8217
10337
|
|
|
8218
10338
|
/**
|
|
@@ -8291,6 +10411,156 @@ export default class Client extends OpenApi {
|
|
|
8291
10411
|
return await this.runWritingWithOptions(request, runtime);
|
|
8292
10412
|
}
|
|
8293
10413
|
|
|
10414
|
+
/**
|
|
10415
|
+
* 直接写作
|
|
10416
|
+
*
|
|
10417
|
+
* @param tmpReq - RunWritingV2Request
|
|
10418
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
10419
|
+
* @returns RunWritingV2Response
|
|
10420
|
+
*/
|
|
10421
|
+
async *runWritingV2WithSSE(tmpReq: $_model.RunWritingV2Request, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWritingV2Response, any, unknown> {
|
|
10422
|
+
tmpReq.validate();
|
|
10423
|
+
let request = new $_model.RunWritingV2ShrinkRequest({ });
|
|
10424
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
10425
|
+
if (!$dara.isNull(tmpReq.articles)) {
|
|
10426
|
+
request.articlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.articles, "Articles", "json");
|
|
10427
|
+
}
|
|
10428
|
+
|
|
10429
|
+
if (!$dara.isNull(tmpReq.keywords)) {
|
|
10430
|
+
request.keywordsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.keywords, "Keywords", "json");
|
|
10431
|
+
}
|
|
10432
|
+
|
|
10433
|
+
if (!$dara.isNull(tmpReq.miniDocs)) {
|
|
10434
|
+
request.miniDocsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.miniDocs, "MiniDocs", "json");
|
|
10435
|
+
}
|
|
10436
|
+
|
|
10437
|
+
if (!$dara.isNull(tmpReq.outlines)) {
|
|
10438
|
+
request.outlinesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.outlines, "Outlines", "json");
|
|
10439
|
+
}
|
|
10440
|
+
|
|
10441
|
+
if (!$dara.isNull(tmpReq.searchSources)) {
|
|
10442
|
+
request.searchSourcesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.searchSources, "SearchSources", "json");
|
|
10443
|
+
}
|
|
10444
|
+
|
|
10445
|
+
if (!$dara.isNull(tmpReq.summarization)) {
|
|
10446
|
+
request.summarizationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.summarization, "Summarization", "json");
|
|
10447
|
+
}
|
|
10448
|
+
|
|
10449
|
+
if (!$dara.isNull(tmpReq.writingParams)) {
|
|
10450
|
+
request.writingParamsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingParams, "WritingParams", "json");
|
|
10451
|
+
}
|
|
10452
|
+
|
|
10453
|
+
let body : {[key: string ]: any} = { };
|
|
10454
|
+
if (!$dara.isNull(request.articlesShrink)) {
|
|
10455
|
+
body["Articles"] = request.articlesShrink;
|
|
10456
|
+
}
|
|
10457
|
+
|
|
10458
|
+
if (!$dara.isNull(request.distributeWriting)) {
|
|
10459
|
+
body["DistributeWriting"] = request.distributeWriting;
|
|
10460
|
+
}
|
|
10461
|
+
|
|
10462
|
+
if (!$dara.isNull(request.gcNumberSize)) {
|
|
10463
|
+
body["GcNumberSize"] = request.gcNumberSize;
|
|
10464
|
+
}
|
|
10465
|
+
|
|
10466
|
+
if (!$dara.isNull(request.gcNumberSizeTag)) {
|
|
10467
|
+
body["GcNumberSizeTag"] = request.gcNumberSizeTag;
|
|
10468
|
+
}
|
|
10469
|
+
|
|
10470
|
+
if (!$dara.isNull(request.keywordsShrink)) {
|
|
10471
|
+
body["Keywords"] = request.keywordsShrink;
|
|
10472
|
+
}
|
|
10473
|
+
|
|
10474
|
+
if (!$dara.isNull(request.language)) {
|
|
10475
|
+
body["Language"] = request.language;
|
|
10476
|
+
}
|
|
10477
|
+
|
|
10478
|
+
if (!$dara.isNull(request.miniDocsShrink)) {
|
|
10479
|
+
body["MiniDocs"] = request.miniDocsShrink;
|
|
10480
|
+
}
|
|
10481
|
+
|
|
10482
|
+
if (!$dara.isNull(request.outlinesShrink)) {
|
|
10483
|
+
body["Outlines"] = request.outlinesShrink;
|
|
10484
|
+
}
|
|
10485
|
+
|
|
10486
|
+
if (!$dara.isNull(request.prompt)) {
|
|
10487
|
+
body["Prompt"] = request.prompt;
|
|
10488
|
+
}
|
|
10489
|
+
|
|
10490
|
+
if (!$dara.isNull(request.promptMode)) {
|
|
10491
|
+
body["PromptMode"] = request.promptMode;
|
|
10492
|
+
}
|
|
10493
|
+
|
|
10494
|
+
if (!$dara.isNull(request.searchSourcesShrink)) {
|
|
10495
|
+
body["SearchSources"] = request.searchSourcesShrink;
|
|
10496
|
+
}
|
|
10497
|
+
|
|
10498
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
10499
|
+
body["SessionId"] = request.sessionId;
|
|
10500
|
+
}
|
|
10501
|
+
|
|
10502
|
+
if (!$dara.isNull(request.step)) {
|
|
10503
|
+
body["Step"] = request.step;
|
|
10504
|
+
}
|
|
10505
|
+
|
|
10506
|
+
if (!$dara.isNull(request.summarizationShrink)) {
|
|
10507
|
+
body["Summarization"] = request.summarizationShrink;
|
|
10508
|
+
}
|
|
10509
|
+
|
|
10510
|
+
if (!$dara.isNull(request.taskId)) {
|
|
10511
|
+
body["TaskId"] = request.taskId;
|
|
10512
|
+
}
|
|
10513
|
+
|
|
10514
|
+
if (!$dara.isNull(request.useSearch)) {
|
|
10515
|
+
body["UseSearch"] = request.useSearch;
|
|
10516
|
+
}
|
|
10517
|
+
|
|
10518
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
10519
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
10520
|
+
}
|
|
10521
|
+
|
|
10522
|
+
if (!$dara.isNull(request.writingParamsShrink)) {
|
|
10523
|
+
body["WritingParams"] = request.writingParamsShrink;
|
|
10524
|
+
}
|
|
10525
|
+
|
|
10526
|
+
if (!$dara.isNull(request.writingScene)) {
|
|
10527
|
+
body["WritingScene"] = request.writingScene;
|
|
10528
|
+
}
|
|
10529
|
+
|
|
10530
|
+
if (!$dara.isNull(request.writingStyle)) {
|
|
10531
|
+
body["WritingStyle"] = request.writingStyle;
|
|
10532
|
+
}
|
|
10533
|
+
|
|
10534
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
10535
|
+
body: OpenApiUtil.parseToMap(body),
|
|
10536
|
+
});
|
|
10537
|
+
let params = new $OpenApiUtil.Params({
|
|
10538
|
+
action: "RunWritingV2",
|
|
10539
|
+
version: "2023-08-01",
|
|
10540
|
+
protocol: "HTTPS",
|
|
10541
|
+
pathname: "/",
|
|
10542
|
+
method: "POST",
|
|
10543
|
+
authType: "AK",
|
|
10544
|
+
style: "RPC",
|
|
10545
|
+
reqBodyType: "formData",
|
|
10546
|
+
bodyType: "json",
|
|
10547
|
+
});
|
|
10548
|
+
let sseResp = await this.callSSEApi(params, req, runtime);
|
|
10549
|
+
|
|
10550
|
+
for await (let resp of sseResp) {
|
|
10551
|
+
let data = JSON.parse(resp.event.data);
|
|
10552
|
+
yield $dara.cast<$_model.RunWritingV2Response>({
|
|
10553
|
+
statusCode: resp.statusCode,
|
|
10554
|
+
headers: resp.headers,
|
|
10555
|
+
body: {
|
|
10556
|
+
...data,
|
|
10557
|
+
RequestId: resp.event.id,
|
|
10558
|
+
Message: resp.event.event,
|
|
10559
|
+
},
|
|
10560
|
+
}, new $_model.RunWritingV2Response({}));
|
|
10561
|
+
}
|
|
10562
|
+
}
|
|
10563
|
+
|
|
8294
10564
|
/**
|
|
8295
10565
|
* 直接写作
|
|
8296
10566
|
*
|
|
@@ -9441,6 +11711,52 @@ export default class Client extends OpenApi {
|
|
|
9441
11711
|
return await this.submitExportTermsTaskWithOptions(request, runtime);
|
|
9442
11712
|
}
|
|
9443
11713
|
|
|
11714
|
+
/**
|
|
11715
|
+
* 妙笔为您提供了新的事实性审核能力,在联网搜索并判断正误的前提下,还支持用户自定义配置搜索来源 URL。
|
|
11716
|
+
*
|
|
11717
|
+
* @param request - SubmitFactAuditUrlRequest
|
|
11718
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
11719
|
+
* @returns SubmitFactAuditUrlResponse
|
|
11720
|
+
*/
|
|
11721
|
+
async submitFactAuditUrlWithOptions(request: $_model.SubmitFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.SubmitFactAuditUrlResponse> {
|
|
11722
|
+
request.validate();
|
|
11723
|
+
let body : {[key: string ]: any} = { };
|
|
11724
|
+
if (!$dara.isNull(request.url)) {
|
|
11725
|
+
body["Url"] = request.url;
|
|
11726
|
+
}
|
|
11727
|
+
|
|
11728
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
11729
|
+
body["WorkspaceId"] = request.workspaceId;
|
|
11730
|
+
}
|
|
11731
|
+
|
|
11732
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
11733
|
+
body: OpenApiUtil.parseToMap(body),
|
|
11734
|
+
});
|
|
11735
|
+
let params = new $OpenApiUtil.Params({
|
|
11736
|
+
action: "SubmitFactAuditUrl",
|
|
11737
|
+
version: "2023-08-01",
|
|
11738
|
+
protocol: "HTTPS",
|
|
11739
|
+
pathname: "/",
|
|
11740
|
+
method: "POST",
|
|
11741
|
+
authType: "AK",
|
|
11742
|
+
style: "RPC",
|
|
11743
|
+
reqBodyType: "formData",
|
|
11744
|
+
bodyType: "json",
|
|
11745
|
+
});
|
|
11746
|
+
return $dara.cast<$_model.SubmitFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.SubmitFactAuditUrlResponse({}));
|
|
11747
|
+
}
|
|
11748
|
+
|
|
11749
|
+
/**
|
|
11750
|
+
* 妙笔为您提供了新的事实性审核能力,在联网搜索并判断正误的前提下,还支持用户自定义配置搜索来源 URL。
|
|
11751
|
+
*
|
|
11752
|
+
* @param request - SubmitFactAuditUrlRequest
|
|
11753
|
+
* @returns SubmitFactAuditUrlResponse
|
|
11754
|
+
*/
|
|
11755
|
+
async submitFactAuditUrl(request: $_model.SubmitFactAuditUrlRequest): Promise<$_model.SubmitFactAuditUrlResponse> {
|
|
11756
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
11757
|
+
return await this.submitFactAuditUrlWithOptions(request, runtime);
|
|
11758
|
+
}
|
|
11759
|
+
|
|
9444
11760
|
/**
|
|
9445
11761
|
* 提交导入自定义词库任务
|
|
9446
11762
|
*
|