@alicloud/aimiaobi20230801 1.32.2 → 1.34.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.
Files changed (145) hide show
  1. package/dist/client.d.ts +403 -4
  2. package/dist/client.js +2807 -20
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/AddAuditTermsRequest.d.ts +1 -0
  5. package/dist/models/AddAuditTermsRequest.js +5 -0
  6. package/dist/models/AddAuditTermsRequest.js.map +1 -1
  7. package/dist/models/AddAuditTermsResponseBody.d.ts +22 -0
  8. package/dist/models/AddAuditTermsResponseBody.js +25 -1
  9. package/dist/models/AddAuditTermsResponseBody.js.map +1 -1
  10. package/dist/models/AddAuditTermsShrinkRequest.d.ts +37 -0
  11. package/dist/models/AddAuditTermsShrinkRequest.js +66 -0
  12. package/dist/models/AddAuditTermsShrinkRequest.js.map +1 -0
  13. package/dist/models/CancelDeepWriteTaskRequest.d.ts +23 -0
  14. package/dist/models/CancelDeepWriteTaskRequest.js +60 -0
  15. package/dist/models/CancelDeepWriteTaskRequest.js.map +1 -0
  16. package/dist/models/CancelDeepWriteTaskResponse.d.ts +19 -0
  17. package/dist/models/CancelDeepWriteTaskResponse.js +69 -0
  18. package/dist/models/CancelDeepWriteTaskResponse.js.map +1 -0
  19. package/dist/models/CancelDeepWriteTaskResponseBody.d.ts +65 -0
  20. package/dist/models/CancelDeepWriteTaskResponseBody.js +94 -0
  21. package/dist/models/CancelDeepWriteTaskResponseBody.js.map +1 -0
  22. package/dist/models/DeleteFactAuditUrlRequest.d.ts +29 -0
  23. package/dist/models/DeleteFactAuditUrlRequest.js +60 -0
  24. package/dist/models/DeleteFactAuditUrlRequest.js.map +1 -0
  25. package/dist/models/DeleteFactAuditUrlResponse.d.ts +19 -0
  26. package/dist/models/DeleteFactAuditUrlResponse.js +69 -0
  27. package/dist/models/DeleteFactAuditUrlResponse.js.map +1 -0
  28. package/dist/models/DeleteFactAuditUrlResponseBody.d.ts +46 -0
  29. package/dist/models/DeleteFactAuditUrlResponseBody.js +68 -0
  30. package/dist/models/DeleteFactAuditUrlResponseBody.js.map +1 -0
  31. package/dist/models/EditAuditTermsRequest.d.ts +1 -0
  32. package/dist/models/EditAuditTermsRequest.js +5 -0
  33. package/dist/models/EditAuditTermsRequest.js.map +1 -1
  34. package/dist/models/EditAuditTermsShrinkRequest.d.ts +42 -0
  35. package/dist/models/EditAuditTermsShrinkRequest.js +68 -0
  36. package/dist/models/EditAuditTermsShrinkRequest.js.map +1 -0
  37. package/dist/models/GetDeepWriteTaskRequest.d.ts +23 -0
  38. package/dist/models/GetDeepWriteTaskRequest.js +60 -0
  39. package/dist/models/GetDeepWriteTaskRequest.js.map +1 -0
  40. package/dist/models/GetDeepWriteTaskResponse.d.ts +19 -0
  41. package/dist/models/GetDeepWriteTaskResponse.js +69 -0
  42. package/dist/models/GetDeepWriteTaskResponse.js.map +1 -0
  43. package/dist/models/GetDeepWriteTaskResponseBody.d.ts +65 -0
  44. package/dist/models/GetDeepWriteTaskResponseBody.js +94 -0
  45. package/dist/models/GetDeepWriteTaskResponseBody.js.map +1 -0
  46. package/dist/models/GetDeepWriteTaskResultRequest.d.ts +23 -0
  47. package/dist/models/GetDeepWriteTaskResultRequest.js +60 -0
  48. package/dist/models/GetDeepWriteTaskResultRequest.js.map +1 -0
  49. package/dist/models/GetDeepWriteTaskResultResponse.d.ts +19 -0
  50. package/dist/models/GetDeepWriteTaskResultResponse.js +69 -0
  51. package/dist/models/GetDeepWriteTaskResultResponse.js.map +1 -0
  52. package/dist/models/GetDeepWriteTaskResultResponseBody.d.ts +60 -0
  53. package/dist/models/GetDeepWriteTaskResultResponseBody.js +92 -0
  54. package/dist/models/GetDeepWriteTaskResultResponseBody.js.map +1 -0
  55. package/dist/models/GetFactAuditUrlRequest.d.ts +21 -0
  56. package/dist/models/GetFactAuditUrlRequest.js +58 -0
  57. package/dist/models/GetFactAuditUrlRequest.js.map +1 -0
  58. package/dist/models/GetFactAuditUrlResponse.d.ts +19 -0
  59. package/dist/models/GetFactAuditUrlResponse.js +69 -0
  60. package/dist/models/GetFactAuditUrlResponse.js.map +1 -0
  61. package/dist/models/GetFactAuditUrlResponseBody.d.ts +46 -0
  62. package/dist/models/GetFactAuditUrlResponseBody.js +71 -0
  63. package/dist/models/GetFactAuditUrlResponseBody.js.map +1 -0
  64. package/dist/models/ListAuditTermsResponseBody.d.ts +1 -0
  65. package/dist/models/ListAuditTermsResponseBody.js +5 -0
  66. package/dist/models/ListAuditTermsResponseBody.js.map +1 -1
  67. package/dist/models/RunDeepWritingRequest.d.ts +31 -0
  68. package/dist/models/RunDeepWritingRequest.js +62 -0
  69. package/dist/models/RunDeepWritingRequest.js.map +1 -0
  70. package/dist/models/RunDeepWritingResponse.d.ts +19 -0
  71. package/dist/models/RunDeepWritingResponse.js +69 -0
  72. package/dist/models/RunDeepWritingResponse.js.map +1 -0
  73. package/dist/models/RunDeepWritingResponseBody.d.ts +201 -0
  74. package/dist/models/RunDeepWritingResponseBody.js +240 -0
  75. package/dist/models/RunDeepWritingResponseBody.js.map +1 -0
  76. package/dist/models/RunVideoScriptGenerateRequest.d.ts +46 -0
  77. package/dist/models/RunVideoScriptGenerateRequest.js +68 -0
  78. package/dist/models/RunVideoScriptGenerateRequest.js.map +1 -0
  79. package/dist/models/RunVideoScriptGenerateResponse.d.ts +19 -0
  80. package/dist/models/RunVideoScriptGenerateResponse.js +69 -0
  81. package/dist/models/RunVideoScriptGenerateResponse.js.map +1 -0
  82. package/dist/models/RunVideoScriptGenerateResponseBody.d.ts +137 -0
  83. package/dist/models/RunVideoScriptGenerateResponseBody.js +176 -0
  84. package/dist/models/RunVideoScriptGenerateResponseBody.js.map +1 -0
  85. package/dist/models/SubmitDeepWriteTaskRequest.d.ts +112 -0
  86. package/dist/models/SubmitDeepWriteTaskRequest.js +188 -0
  87. package/dist/models/SubmitDeepWriteTaskRequest.js.map +1 -0
  88. package/dist/models/SubmitDeepWriteTaskResponse.d.ts +19 -0
  89. package/dist/models/SubmitDeepWriteTaskResponse.js +69 -0
  90. package/dist/models/SubmitDeepWriteTaskResponse.js.map +1 -0
  91. package/dist/models/SubmitDeepWriteTaskResponseBody.d.ts +64 -0
  92. package/dist/models/SubmitDeepWriteTaskResponseBody.js +92 -0
  93. package/dist/models/SubmitDeepWriteTaskResponseBody.js.map +1 -0
  94. package/dist/models/SubmitDeepWriteTaskShrinkRequest.d.ts +29 -0
  95. package/dist/models/SubmitDeepWriteTaskShrinkRequest.js +66 -0
  96. package/dist/models/SubmitDeepWriteTaskShrinkRequest.js.map +1 -0
  97. package/dist/models/SubmitFactAuditUrlRequest.d.ts +29 -0
  98. package/dist/models/SubmitFactAuditUrlRequest.js +60 -0
  99. package/dist/models/SubmitFactAuditUrlRequest.js.map +1 -0
  100. package/dist/models/SubmitFactAuditUrlResponse.d.ts +19 -0
  101. package/dist/models/SubmitFactAuditUrlResponse.js +69 -0
  102. package/dist/models/SubmitFactAuditUrlResponse.js.map +1 -0
  103. package/dist/models/SubmitFactAuditUrlResponseBody.d.ts +46 -0
  104. package/dist/models/SubmitFactAuditUrlResponseBody.js +68 -0
  105. package/dist/models/SubmitFactAuditUrlResponseBody.js.map +1 -0
  106. package/dist/models/model.d.ts +50 -0
  107. package/dist/models/model.js +125 -24
  108. package/dist/models/model.js.map +1 -1
  109. package/package.json +1 -1
  110. package/src/client.ts +3326 -574
  111. package/src/models/AddAuditTermsRequest.ts +6 -0
  112. package/src/models/AddAuditTermsResponseBody.ts +37 -0
  113. package/src/models/AddAuditTermsShrinkRequest.ts +58 -0
  114. package/src/models/CancelDeepWriteTaskRequest.ts +38 -0
  115. package/src/models/CancelDeepWriteTaskResponse.ts +40 -0
  116. package/src/models/CancelDeepWriteTaskResponseBody.ts +105 -0
  117. package/src/models/DeleteFactAuditUrlRequest.ts +44 -0
  118. package/src/models/DeleteFactAuditUrlResponse.ts +40 -0
  119. package/src/models/DeleteFactAuditUrlResponseBody.ts +69 -0
  120. package/src/models/EditAuditTermsRequest.ts +6 -0
  121. package/src/models/EditAuditTermsShrinkRequest.ts +65 -0
  122. package/src/models/GetDeepWriteTaskRequest.ts +38 -0
  123. package/src/models/GetDeepWriteTaskResponse.ts +40 -0
  124. package/src/models/GetDeepWriteTaskResponseBody.ts +105 -0
  125. package/src/models/GetDeepWriteTaskResultRequest.ts +38 -0
  126. package/src/models/GetDeepWriteTaskResultResponse.ts +40 -0
  127. package/src/models/GetDeepWriteTaskResultResponseBody.ts +98 -0
  128. package/src/models/GetFactAuditUrlRequest.ts +34 -0
  129. package/src/models/GetFactAuditUrlResponse.ts +40 -0
  130. package/src/models/GetFactAuditUrlResponseBody.ts +72 -0
  131. package/src/models/ListAuditTermsResponseBody.ts +6 -0
  132. package/src/models/RunDeepWritingRequest.ts +48 -0
  133. package/src/models/RunDeepWritingResponse.ts +40 -0
  134. package/src/models/RunDeepWritingResponseBody.ts +342 -0
  135. package/src/models/RunVideoScriptGenerateRequest.ts +69 -0
  136. package/src/models/RunVideoScriptGenerateResponse.ts +40 -0
  137. package/src/models/RunVideoScriptGenerateResponseBody.ts +232 -0
  138. package/src/models/SubmitDeepWriteTaskRequest.ts +210 -0
  139. package/src/models/SubmitDeepWriteTaskResponse.ts +40 -0
  140. package/src/models/SubmitDeepWriteTaskResponseBody.ts +102 -0
  141. package/src/models/SubmitDeepWriteTaskShrinkRequest.ts +50 -0
  142. package/src/models/SubmitFactAuditUrlRequest.ts +44 -0
  143. package/src/models/SubmitFactAuditUrlResponse.ts +40 -0
  144. package/src/models/SubmitFactAuditUrlResponseBody.ts +69 -0
  145. package/src/models/model.ts +50 -0
package/src/client.ts CHANGED
@@ -32,13 +32,23 @@ export default class Client extends OpenApi {
32
32
  /**
33
33
  * 添加审核自定义词库记录
34
34
  *
35
- * @param request - AddAuditTermsRequest
35
+ * @param tmpReq - AddAuditTermsRequest
36
36
  * @param runtime - runtime options for this request RuntimeOptions
37
37
  * @returns AddAuditTermsResponse
38
38
  */
39
- async addAuditTermsWithOptions(request: $_model.AddAuditTermsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AddAuditTermsResponse> {
40
- request.validate();
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
  }
@@ -515,6 +525,52 @@ export default class Client extends OpenApi {
515
525
  return await this.cancelAuditTaskWithOptions(request, runtime);
516
526
  }
517
527
 
528
+ /**
529
+ * 取消深度写作任务
530
+ *
531
+ * @param request - CancelDeepWriteTaskRequest
532
+ * @param runtime - runtime options for this request RuntimeOptions
533
+ * @returns CancelDeepWriteTaskResponse
534
+ */
535
+ async cancelDeepWriteTaskWithOptions(request: $_model.CancelDeepWriteTaskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelDeepWriteTaskResponse> {
536
+ request.validate();
537
+ let body : {[key: string ]: any} = { };
538
+ if (!$dara.isNull(request.taskId)) {
539
+ body["TaskId"] = request.taskId;
540
+ }
541
+
542
+ if (!$dara.isNull(request.workspaceId)) {
543
+ body["WorkspaceId"] = request.workspaceId;
544
+ }
545
+
546
+ let req = new $OpenApiUtil.OpenApiRequest({
547
+ body: OpenApiUtil.parseToMap(body),
548
+ });
549
+ let params = new $OpenApiUtil.Params({
550
+ action: "CancelDeepWriteTask",
551
+ version: "2023-08-01",
552
+ protocol: "HTTPS",
553
+ pathname: "/",
554
+ method: "POST",
555
+ authType: "AK",
556
+ style: "RPC",
557
+ reqBodyType: "formData",
558
+ bodyType: "json",
559
+ });
560
+ return $dara.cast<$_model.CancelDeepWriteTaskResponse>(await this.callApi(params, req, runtime), new $_model.CancelDeepWriteTaskResponse({}));
561
+ }
562
+
563
+ /**
564
+ * 取消深度写作任务
565
+ *
566
+ * @param request - CancelDeepWriteTaskRequest
567
+ * @returns CancelDeepWriteTaskResponse
568
+ */
569
+ async cancelDeepWriteTask(request: $_model.CancelDeepWriteTaskRequest): Promise<$_model.CancelDeepWriteTaskResponse> {
570
+ let runtime = new $dara.RuntimeOptions({ });
571
+ return await this.cancelDeepWriteTaskWithOptions(request, runtime);
572
+ }
573
+
518
574
  /**
519
575
  * 清除所有干预内容
520
576
  *
@@ -1205,6 +1261,52 @@ export default class Client extends OpenApi {
1205
1261
  return await this.deleteDocsWithOptions(request, runtime);
1206
1262
  }
1207
1263
 
1264
+ /**
1265
+ * 删除指定的用于事实性审核的 URL。
1266
+ *
1267
+ * @param request - DeleteFactAuditUrlRequest
1268
+ * @param runtime - runtime options for this request RuntimeOptions
1269
+ * @returns DeleteFactAuditUrlResponse
1270
+ */
1271
+ async deleteFactAuditUrlWithOptions(request: $_model.DeleteFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteFactAuditUrlResponse> {
1272
+ request.validate();
1273
+ let body : {[key: string ]: any} = { };
1274
+ if (!$dara.isNull(request.url)) {
1275
+ body["Url"] = request.url;
1276
+ }
1277
+
1278
+ if (!$dara.isNull(request.workspaceId)) {
1279
+ body["WorkspaceId"] = request.workspaceId;
1280
+ }
1281
+
1282
+ let req = new $OpenApiUtil.OpenApiRequest({
1283
+ body: OpenApiUtil.parseToMap(body),
1284
+ });
1285
+ let params = new $OpenApiUtil.Params({
1286
+ action: "DeleteFactAuditUrl",
1287
+ version: "2023-08-01",
1288
+ protocol: "HTTPS",
1289
+ pathname: "/",
1290
+ method: "POST",
1291
+ authType: "AK",
1292
+ style: "RPC",
1293
+ reqBodyType: "formData",
1294
+ bodyType: "json",
1295
+ });
1296
+ return $dara.cast<$_model.DeleteFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.DeleteFactAuditUrlResponse({}));
1297
+ }
1298
+
1299
+ /**
1300
+ * 删除指定的用于事实性审核的 URL。
1301
+ *
1302
+ * @param request - DeleteFactAuditUrlRequest
1303
+ * @returns DeleteFactAuditUrlResponse
1304
+ */
1305
+ async deleteFactAuditUrl(request: $_model.DeleteFactAuditUrlRequest): Promise<$_model.DeleteFactAuditUrlResponse> {
1306
+ let runtime = new $dara.RuntimeOptions({ });
1307
+ return await this.deleteFactAuditUrlWithOptions(request, runtime);
1308
+ }
1309
+
1208
1310
  /**
1209
1311
  * 文档管理-删除。
1210
1312
  *
@@ -1504,13 +1606,23 @@ export default class Client extends OpenApi {
1504
1606
  /**
1505
1607
  * 编辑审核自定义词库记录
1506
1608
  *
1507
- * @param request - EditAuditTermsRequest
1609
+ * @param tmpReq - EditAuditTermsRequest
1508
1610
  * @param runtime - runtime options for this request RuntimeOptions
1509
1611
  * @returns EditAuditTermsResponse
1510
1612
  */
1511
- async editAuditTermsWithOptions(request: $_model.EditAuditTermsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EditAuditTermsResponse> {
1512
- request.validate();
1613
+ async editAuditTermsWithOptions(tmpReq: $_model.EditAuditTermsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EditAuditTermsResponse> {
1614
+ tmpReq.validate();
1615
+ let request = new $_model.EditAuditTermsShrinkRequest({ });
1616
+ OpenApiUtil.convert(tmpReq, request);
1617
+ if (!$dara.isNull(tmpReq.exceptionWord)) {
1618
+ request.exceptionWordShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.exceptionWord, "ExceptionWord", "json");
1619
+ }
1620
+
1513
1621
  let body : {[key: string ]: any} = { };
1622
+ if (!$dara.isNull(request.exceptionWordShrink)) {
1623
+ body["ExceptionWord"] = request.exceptionWordShrink;
1624
+ }
1625
+
1514
1626
  if (!$dara.isNull(request.id)) {
1515
1627
  body["Id"] = request.id;
1516
1628
  }
@@ -3001,6 +3113,98 @@ export default class Client extends OpenApi {
3001
3113
  return await this.getDatasetDocumentWithOptions(request, runtime);
3002
3114
  }
3003
3115
 
3116
+ /**
3117
+ * 查询深度写作任务
3118
+ *
3119
+ * @param request - GetDeepWriteTaskRequest
3120
+ * @param runtime - runtime options for this request RuntimeOptions
3121
+ * @returns GetDeepWriteTaskResponse
3122
+ */
3123
+ async getDeepWriteTaskWithOptions(request: $_model.GetDeepWriteTaskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetDeepWriteTaskResponse> {
3124
+ request.validate();
3125
+ let body : {[key: string ]: any} = { };
3126
+ if (!$dara.isNull(request.taskId)) {
3127
+ body["TaskId"] = request.taskId;
3128
+ }
3129
+
3130
+ if (!$dara.isNull(request.workspaceId)) {
3131
+ body["WorkspaceId"] = request.workspaceId;
3132
+ }
3133
+
3134
+ let req = new $OpenApiUtil.OpenApiRequest({
3135
+ body: OpenApiUtil.parseToMap(body),
3136
+ });
3137
+ let params = new $OpenApiUtil.Params({
3138
+ action: "GetDeepWriteTask",
3139
+ version: "2023-08-01",
3140
+ protocol: "HTTPS",
3141
+ pathname: "/",
3142
+ method: "POST",
3143
+ authType: "AK",
3144
+ style: "RPC",
3145
+ reqBodyType: "formData",
3146
+ bodyType: "json",
3147
+ });
3148
+ return $dara.cast<$_model.GetDeepWriteTaskResponse>(await this.callApi(params, req, runtime), new $_model.GetDeepWriteTaskResponse({}));
3149
+ }
3150
+
3151
+ /**
3152
+ * 查询深度写作任务
3153
+ *
3154
+ * @param request - GetDeepWriteTaskRequest
3155
+ * @returns GetDeepWriteTaskResponse
3156
+ */
3157
+ async getDeepWriteTask(request: $_model.GetDeepWriteTaskRequest): Promise<$_model.GetDeepWriteTaskResponse> {
3158
+ let runtime = new $dara.RuntimeOptions({ });
3159
+ return await this.getDeepWriteTaskWithOptions(request, runtime);
3160
+ }
3161
+
3162
+ /**
3163
+ * 查询深度写作任务的结果
3164
+ *
3165
+ * @param request - GetDeepWriteTaskResultRequest
3166
+ * @param runtime - runtime options for this request RuntimeOptions
3167
+ * @returns GetDeepWriteTaskResultResponse
3168
+ */
3169
+ async getDeepWriteTaskResultWithOptions(request: $_model.GetDeepWriteTaskResultRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetDeepWriteTaskResultResponse> {
3170
+ request.validate();
3171
+ let body : {[key: string ]: any} = { };
3172
+ if (!$dara.isNull(request.taskId)) {
3173
+ body["TaskId"] = request.taskId;
3174
+ }
3175
+
3176
+ if (!$dara.isNull(request.workspaceId)) {
3177
+ body["WorkspaceId"] = request.workspaceId;
3178
+ }
3179
+
3180
+ let req = new $OpenApiUtil.OpenApiRequest({
3181
+ body: OpenApiUtil.parseToMap(body),
3182
+ });
3183
+ let params = new $OpenApiUtil.Params({
3184
+ action: "GetDeepWriteTaskResult",
3185
+ version: "2023-08-01",
3186
+ protocol: "HTTPS",
3187
+ pathname: "/",
3188
+ method: "POST",
3189
+ authType: "AK",
3190
+ style: "RPC",
3191
+ reqBodyType: "formData",
3192
+ bodyType: "json",
3193
+ });
3194
+ return $dara.cast<$_model.GetDeepWriteTaskResultResponse>(await this.callApi(params, req, runtime), new $_model.GetDeepWriteTaskResultResponse({}));
3195
+ }
3196
+
3197
+ /**
3198
+ * 查询深度写作任务的结果
3199
+ *
3200
+ * @param request - GetDeepWriteTaskResultRequest
3201
+ * @returns GetDeepWriteTaskResultResponse
3202
+ */
3203
+ async getDeepWriteTaskResult(request: $_model.GetDeepWriteTaskResultRequest): Promise<$_model.GetDeepWriteTaskResultResponse> {
3204
+ let runtime = new $dara.RuntimeOptions({ });
3205
+ return await this.getDeepWriteTaskResultWithOptions(request, runtime);
3206
+ }
3207
+
3004
3208
  /**
3005
3209
  * 获取文档聚合任务结果
3006
3210
  *
@@ -3145,6 +3349,48 @@ export default class Client extends OpenApi {
3145
3349
  return await this.getEnterpriseVocAnalysisTaskWithOptions(request, runtime);
3146
3350
  }
3147
3351
 
3352
+ /**
3353
+ * 获取当前正用于事实性审核的信源 URL。
3354
+ *
3355
+ * @param request - GetFactAuditUrlRequest
3356
+ * @param runtime - runtime options for this request RuntimeOptions
3357
+ * @returns GetFactAuditUrlResponse
3358
+ */
3359
+ async getFactAuditUrlWithOptions(request: $_model.GetFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetFactAuditUrlResponse> {
3360
+ request.validate();
3361
+ let body : {[key: string ]: any} = { };
3362
+ if (!$dara.isNull(request.workspaceId)) {
3363
+ body["WorkspaceId"] = request.workspaceId;
3364
+ }
3365
+
3366
+ let req = new $OpenApiUtil.OpenApiRequest({
3367
+ body: OpenApiUtil.parseToMap(body),
3368
+ });
3369
+ let params = new $OpenApiUtil.Params({
3370
+ action: "GetFactAuditUrl",
3371
+ version: "2023-08-01",
3372
+ protocol: "HTTPS",
3373
+ pathname: "/",
3374
+ method: "POST",
3375
+ authType: "AK",
3376
+ style: "RPC",
3377
+ reqBodyType: "formData",
3378
+ bodyType: "json",
3379
+ });
3380
+ return $dara.cast<$_model.GetFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.GetFactAuditUrlResponse({}));
3381
+ }
3382
+
3383
+ /**
3384
+ * 获取当前正用于事实性审核的信源 URL。
3385
+ *
3386
+ * @param request - GetFactAuditUrlRequest
3387
+ * @returns GetFactAuditUrlResponse
3388
+ */
3389
+ async getFactAuditUrl(request: $_model.GetFactAuditUrlRequest): Promise<$_model.GetFactAuditUrlResponse> {
3390
+ let runtime = new $dara.RuntimeOptions({ });
3391
+ return await this.getFactAuditUrlWithOptions(request, runtime);
3392
+ }
3393
+
3148
3394
  /**
3149
3395
  * 妙读获得文档字数
3150
3396
  *
@@ -6339,6 +6585,58 @@ export default class Client extends OpenApi {
6339
6585
  return await this.queryAuditTaskWithOptions(request, runtime);
6340
6586
  }
6341
6587
 
6588
+ /**
6589
+ * 内容缩写
6590
+ *
6591
+ * @param request - RunAbbreviationContentRequest
6592
+ * @param runtime - runtime options for this request RuntimeOptions
6593
+ * @returns RunAbbreviationContentResponse
6594
+ */
6595
+ async *runAbbreviationContentWithSSE(request: $_model.RunAbbreviationContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunAbbreviationContentResponse, any, unknown> {
6596
+ request.validate();
6597
+ let body : {[key: string ]: any} = { };
6598
+ if (!$dara.isNull(request.content)) {
6599
+ body["Content"] = request.content;
6600
+ }
6601
+
6602
+ if (!$dara.isNull(request.prompt)) {
6603
+ body["Prompt"] = request.prompt;
6604
+ }
6605
+
6606
+ if (!$dara.isNull(request.workspaceId)) {
6607
+ body["WorkspaceId"] = request.workspaceId;
6608
+ }
6609
+
6610
+ let req = new $OpenApiUtil.OpenApiRequest({
6611
+ body: OpenApiUtil.parseToMap(body),
6612
+ });
6613
+ let params = new $OpenApiUtil.Params({
6614
+ action: "RunAbbreviationContent",
6615
+ version: "2023-08-01",
6616
+ protocol: "HTTPS",
6617
+ pathname: "/",
6618
+ method: "POST",
6619
+ authType: "AK",
6620
+ style: "RPC",
6621
+ reqBodyType: "formData",
6622
+ bodyType: "json",
6623
+ });
6624
+ let sseResp = await this.callSSEApi(params, req, runtime);
6625
+
6626
+ for await (let resp of sseResp) {
6627
+ let data = JSON.parse(resp.event.data);
6628
+ yield $dara.cast<$_model.RunAbbreviationContentResponse>({
6629
+ statusCode: resp.statusCode,
6630
+ headers: resp.headers,
6631
+ body: {
6632
+ ...data,
6633
+ RequestId: resp.event.id,
6634
+ Message: resp.event.event,
6635
+ },
6636
+ }, new $_model.RunAbbreviationContentResponse({}));
6637
+ }
6638
+ }
6639
+
6342
6640
  /**
6343
6641
  * 内容缩写
6344
6642
  *
@@ -6396,7 +6694,7 @@ export default class Client extends OpenApi {
6396
6694
  * @param runtime - runtime options for this request RuntimeOptions
6397
6695
  * @returns RunBookBrainmapResponse
6398
6696
  */
6399
- async runBookBrainmapWithOptions(request: $_model.RunBookBrainmapRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunBookBrainmapResponse> {
6697
+ async *runBookBrainmapWithSSE(request: $_model.RunBookBrainmapRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookBrainmapResponse, any, unknown> {
6400
6698
  request.validate();
6401
6699
  let body : {[key: string ]: any} = { };
6402
6700
  if (!$dara.isNull(request.cleanCache)) {
@@ -6441,41 +6739,169 @@ export default class Client extends OpenApi {
6441
6739
  reqBodyType: "formData",
6442
6740
  bodyType: "json",
6443
6741
  });
6444
- return $dara.cast<$_model.RunBookBrainmapResponse>(await this.callApi(params, req, runtime), new $_model.RunBookBrainmapResponse({}));
6742
+ let sseResp = await this.callSSEApi(params, req, runtime);
6743
+
6744
+ for await (let resp of sseResp) {
6745
+ let data = JSON.parse(resp.event.data);
6746
+ yield $dara.cast<$_model.RunBookBrainmapResponse>({
6747
+ statusCode: resp.statusCode,
6748
+ headers: resp.headers,
6749
+ body: {
6750
+ ...data,
6751
+ RequestId: resp.event.id,
6752
+ Message: resp.event.event,
6753
+ },
6754
+ }, new $_model.RunBookBrainmapResponse({}));
6755
+ }
6445
6756
  }
6446
6757
 
6447
6758
  /**
6448
6759
  * 妙读生成书籍脑图
6449
6760
  *
6450
6761
  * @param request - RunBookBrainmapRequest
6451
- * @returns RunBookBrainmapResponse
6452
- */
6453
- async runBookBrainmap(request: $_model.RunBookBrainmapRequest): Promise<$_model.RunBookBrainmapResponse> {
6454
- let runtime = new $dara.RuntimeOptions({ });
6455
- return await this.runBookBrainmapWithOptions(request, runtime);
6456
- }
6457
-
6458
- /**
6459
- * 书籍导读接口
6460
- *
6461
- * @param request - RunBookIntroductionRequest
6462
6762
  * @param runtime - runtime options for this request RuntimeOptions
6463
- * @returns RunBookIntroductionResponse
6763
+ * @returns RunBookBrainmapResponse
6464
6764
  */
6465
- async runBookIntroductionWithOptions(request: $_model.RunBookIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunBookIntroductionResponse> {
6765
+ async runBookBrainmapWithOptions(request: $_model.RunBookBrainmapRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunBookBrainmapResponse> {
6466
6766
  request.validate();
6467
6767
  let body : {[key: string ]: any} = { };
6768
+ if (!$dara.isNull(request.cleanCache)) {
6769
+ body["CleanCache"] = request.cleanCache;
6770
+ }
6771
+
6468
6772
  if (!$dara.isNull(request.docId)) {
6469
6773
  body["DocId"] = request.docId;
6470
6774
  }
6471
6775
 
6472
- if (!$dara.isNull(request.keyPointPrompt)) {
6473
- body["KeyPointPrompt"] = request.keyPointPrompt;
6776
+ if (!$dara.isNull(request.nodeNumber)) {
6777
+ body["NodeNumber"] = request.nodeNumber;
6474
6778
  }
6475
6779
 
6476
- if (!$dara.isNull(request.sessionId)) {
6477
- body["SessionId"] = request.sessionId;
6478
- }
6780
+ if (!$dara.isNull(request.prompt)) {
6781
+ body["Prompt"] = request.prompt;
6782
+ }
6783
+
6784
+ if (!$dara.isNull(request.sessionId)) {
6785
+ body["SessionId"] = request.sessionId;
6786
+ }
6787
+
6788
+ if (!$dara.isNull(request.wordNumber)) {
6789
+ body["WordNumber"] = request.wordNumber;
6790
+ }
6791
+
6792
+ if (!$dara.isNull(request.workspaceId)) {
6793
+ body["WorkspaceId"] = request.workspaceId;
6794
+ }
6795
+
6796
+ let req = new $OpenApiUtil.OpenApiRequest({
6797
+ body: OpenApiUtil.parseToMap(body),
6798
+ });
6799
+ let params = new $OpenApiUtil.Params({
6800
+ action: "RunBookBrainmap",
6801
+ version: "2023-08-01",
6802
+ protocol: "HTTPS",
6803
+ pathname: "/",
6804
+ method: "POST",
6805
+ authType: "AK",
6806
+ style: "RPC",
6807
+ reqBodyType: "formData",
6808
+ bodyType: "json",
6809
+ });
6810
+ return $dara.cast<$_model.RunBookBrainmapResponse>(await this.callApi(params, req, runtime), new $_model.RunBookBrainmapResponse({}));
6811
+ }
6812
+
6813
+ /**
6814
+ * 妙读生成书籍脑图
6815
+ *
6816
+ * @param request - RunBookBrainmapRequest
6817
+ * @returns RunBookBrainmapResponse
6818
+ */
6819
+ async runBookBrainmap(request: $_model.RunBookBrainmapRequest): Promise<$_model.RunBookBrainmapResponse> {
6820
+ let runtime = new $dara.RuntimeOptions({ });
6821
+ return await this.runBookBrainmapWithOptions(request, runtime);
6822
+ }
6823
+
6824
+ /**
6825
+ * 书籍导读接口
6826
+ *
6827
+ * @param request - RunBookIntroductionRequest
6828
+ * @param runtime - runtime options for this request RuntimeOptions
6829
+ * @returns RunBookIntroductionResponse
6830
+ */
6831
+ async *runBookIntroductionWithSSE(request: $_model.RunBookIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookIntroductionResponse, any, unknown> {
6832
+ request.validate();
6833
+ let body : {[key: string ]: any} = { };
6834
+ if (!$dara.isNull(request.docId)) {
6835
+ body["DocId"] = request.docId;
6836
+ }
6837
+
6838
+ if (!$dara.isNull(request.keyPointPrompt)) {
6839
+ body["KeyPointPrompt"] = request.keyPointPrompt;
6840
+ }
6841
+
6842
+ if (!$dara.isNull(request.sessionId)) {
6843
+ body["SessionId"] = request.sessionId;
6844
+ }
6845
+
6846
+ if (!$dara.isNull(request.summaryPrompt)) {
6847
+ body["SummaryPrompt"] = request.summaryPrompt;
6848
+ }
6849
+
6850
+ if (!$dara.isNull(request.workspaceId)) {
6851
+ body["WorkspaceId"] = request.workspaceId;
6852
+ }
6853
+
6854
+ let req = new $OpenApiUtil.OpenApiRequest({
6855
+ body: OpenApiUtil.parseToMap(body),
6856
+ });
6857
+ let params = new $OpenApiUtil.Params({
6858
+ action: "RunBookIntroduction",
6859
+ version: "2023-08-01",
6860
+ protocol: "HTTPS",
6861
+ pathname: "/",
6862
+ method: "POST",
6863
+ authType: "AK",
6864
+ style: "RPC",
6865
+ reqBodyType: "formData",
6866
+ bodyType: "json",
6867
+ });
6868
+ let sseResp = await this.callSSEApi(params, req, runtime);
6869
+
6870
+ for await (let resp of sseResp) {
6871
+ let data = JSON.parse(resp.event.data);
6872
+ yield $dara.cast<$_model.RunBookIntroductionResponse>({
6873
+ statusCode: resp.statusCode,
6874
+ headers: resp.headers,
6875
+ body: {
6876
+ ...data,
6877
+ RequestId: resp.event.id,
6878
+ Message: resp.event.event,
6879
+ },
6880
+ }, new $_model.RunBookIntroductionResponse({}));
6881
+ }
6882
+ }
6883
+
6884
+ /**
6885
+ * 书籍导读接口
6886
+ *
6887
+ * @param request - RunBookIntroductionRequest
6888
+ * @param runtime - runtime options for this request RuntimeOptions
6889
+ * @returns RunBookIntroductionResponse
6890
+ */
6891
+ async runBookIntroductionWithOptions(request: $_model.RunBookIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunBookIntroductionResponse> {
6892
+ request.validate();
6893
+ let body : {[key: string ]: any} = { };
6894
+ if (!$dara.isNull(request.docId)) {
6895
+ body["DocId"] = request.docId;
6896
+ }
6897
+
6898
+ if (!$dara.isNull(request.keyPointPrompt)) {
6899
+ body["KeyPointPrompt"] = request.keyPointPrompt;
6900
+ }
6901
+
6902
+ if (!$dara.isNull(request.sessionId)) {
6903
+ body["SessionId"] = request.sessionId;
6904
+ }
6479
6905
 
6480
6906
  if (!$dara.isNull(request.summaryPrompt)) {
6481
6907
  body["SummaryPrompt"] = request.summaryPrompt;
@@ -6513,6 +6939,58 @@ export default class Client extends OpenApi {
6513
6939
  return await this.runBookIntroductionWithOptions(request, runtime);
6514
6940
  }
6515
6941
 
6942
+ /**
6943
+ * 书籍智能卡片接口
6944
+ *
6945
+ * @param request - RunBookSmartCardRequest
6946
+ * @param runtime - runtime options for this request RuntimeOptions
6947
+ * @returns RunBookSmartCardResponse
6948
+ */
6949
+ async *runBookSmartCardWithSSE(request: $_model.RunBookSmartCardRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunBookSmartCardResponse, any, unknown> {
6950
+ request.validate();
6951
+ let body : {[key: string ]: any} = { };
6952
+ if (!$dara.isNull(request.docId)) {
6953
+ body["DocId"] = request.docId;
6954
+ }
6955
+
6956
+ if (!$dara.isNull(request.sessionId)) {
6957
+ body["SessionId"] = request.sessionId;
6958
+ }
6959
+
6960
+ if (!$dara.isNull(request.workspaceId)) {
6961
+ body["WorkspaceId"] = request.workspaceId;
6962
+ }
6963
+
6964
+ let req = new $OpenApiUtil.OpenApiRequest({
6965
+ body: OpenApiUtil.parseToMap(body),
6966
+ });
6967
+ let params = new $OpenApiUtil.Params({
6968
+ action: "RunBookSmartCard",
6969
+ version: "2023-08-01",
6970
+ protocol: "HTTPS",
6971
+ pathname: "/",
6972
+ method: "POST",
6973
+ authType: "AK",
6974
+ style: "RPC",
6975
+ reqBodyType: "formData",
6976
+ bodyType: "json",
6977
+ });
6978
+ let sseResp = await this.callSSEApi(params, req, runtime);
6979
+
6980
+ for await (let resp of sseResp) {
6981
+ let data = JSON.parse(resp.event.data);
6982
+ yield $dara.cast<$_model.RunBookSmartCardResponse>({
6983
+ statusCode: resp.statusCode,
6984
+ headers: resp.headers,
6985
+ body: {
6986
+ ...data,
6987
+ RequestId: resp.event.id,
6988
+ Message: resp.event.event,
6989
+ },
6990
+ }, new $_model.RunBookSmartCardResponse({}));
6991
+ }
6992
+ }
6993
+
6516
6994
  /**
6517
6995
  * 书籍智能卡片接口
6518
6996
  *
@@ -6563,6 +7041,108 @@ export default class Client extends OpenApi {
6563
7041
  return await this.runBookSmartCardWithOptions(request, runtime);
6564
7042
  }
6565
7043
 
7044
+ /**
7045
+ * 客户之声预测
7046
+ *
7047
+ * @param tmpReq - RunCommentGenerationRequest
7048
+ * @param runtime - runtime options for this request RuntimeOptions
7049
+ * @returns RunCommentGenerationResponse
7050
+ */
7051
+ async *runCommentGenerationWithSSE(tmpReq: $_model.RunCommentGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCommentGenerationResponse, any, unknown> {
7052
+ tmpReq.validate();
7053
+ let request = new $_model.RunCommentGenerationShrinkRequest({ });
7054
+ OpenApiUtil.convert(tmpReq, request);
7055
+ if (!$dara.isNull(tmpReq.lengthRange)) {
7056
+ request.lengthRangeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lengthRange, "LengthRange", "json");
7057
+ }
7058
+
7059
+ if (!$dara.isNull(tmpReq.sentiment)) {
7060
+ request.sentimentShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sentiment, "Sentiment", "json");
7061
+ }
7062
+
7063
+ if (!$dara.isNull(tmpReq.type)) {
7064
+ request.typeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.type, "Type", "json");
7065
+ }
7066
+
7067
+ let body : {[key: string ]: any} = { };
7068
+ if (!$dara.isNull(request.allowEmoji)) {
7069
+ body["AllowEmoji"] = request.allowEmoji;
7070
+ }
7071
+
7072
+ if (!$dara.isNull(request.extraInfo)) {
7073
+ body["ExtraInfo"] = request.extraInfo;
7074
+ }
7075
+
7076
+ if (!$dara.isNull(request.length)) {
7077
+ body["Length"] = request.length;
7078
+ }
7079
+
7080
+ if (!$dara.isNull(request.lengthRangeShrink)) {
7081
+ body["LengthRange"] = request.lengthRangeShrink;
7082
+ }
7083
+
7084
+ if (!$dara.isNull(request.modelId)) {
7085
+ body["ModelId"] = request.modelId;
7086
+ }
7087
+
7088
+ if (!$dara.isNull(request.numComments)) {
7089
+ body["NumComments"] = request.numComments;
7090
+ }
7091
+
7092
+ if (!$dara.isNull(request.sentimentShrink)) {
7093
+ body["Sentiment"] = request.sentimentShrink;
7094
+ }
7095
+
7096
+ if (!$dara.isNull(request.sessionId)) {
7097
+ body["SessionId"] = request.sessionId;
7098
+ }
7099
+
7100
+ if (!$dara.isNull(request.sourceMaterial)) {
7101
+ body["SourceMaterial"] = request.sourceMaterial;
7102
+ }
7103
+
7104
+ if (!$dara.isNull(request.style)) {
7105
+ body["Style"] = request.style;
7106
+ }
7107
+
7108
+ if (!$dara.isNull(request.typeShrink)) {
7109
+ body["Type"] = request.typeShrink;
7110
+ }
7111
+
7112
+ if (!$dara.isNull(request.workspaceId)) {
7113
+ body["WorkspaceId"] = request.workspaceId;
7114
+ }
7115
+
7116
+ let req = new $OpenApiUtil.OpenApiRequest({
7117
+ body: OpenApiUtil.parseToMap(body),
7118
+ });
7119
+ let params = new $OpenApiUtil.Params({
7120
+ action: "RunCommentGeneration",
7121
+ version: "2023-08-01",
7122
+ protocol: "HTTPS",
7123
+ pathname: "/",
7124
+ method: "POST",
7125
+ authType: "AK",
7126
+ style: "RPC",
7127
+ reqBodyType: "formData",
7128
+ bodyType: "json",
7129
+ });
7130
+ let sseResp = await this.callSSEApi(params, req, runtime);
7131
+
7132
+ for await (let resp of sseResp) {
7133
+ let data = JSON.parse(resp.event.data);
7134
+ yield $dara.cast<$_model.RunCommentGenerationResponse>({
7135
+ statusCode: resp.statusCode,
7136
+ headers: resp.headers,
7137
+ body: {
7138
+ ...data,
7139
+ RequestId: resp.event.id,
7140
+ Message: resp.event.event,
7141
+ },
7142
+ }, new $_model.RunCommentGenerationResponse({}));
7143
+ }
7144
+ }
7145
+
6566
7146
  /**
6567
7147
  * 客户之声预测
6568
7148
  *
@@ -6670,7 +7250,7 @@ export default class Client extends OpenApi {
6670
7250
  * @param runtime - runtime options for this request RuntimeOptions
6671
7251
  * @returns RunContinueContentResponse
6672
7252
  */
6673
- async runContinueContentWithOptions(request: $_model.RunContinueContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunContinueContentResponse> {
7253
+ async *runContinueContentWithSSE(request: $_model.RunContinueContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunContinueContentResponse, any, unknown> {
6674
7254
  request.validate();
6675
7255
  let body : {[key: string ]: any} = { };
6676
7256
  if (!$dara.isNull(request.content)) {
@@ -6695,21 +7275,137 @@ export default class Client extends OpenApi {
6695
7275
  reqBodyType: "formData",
6696
7276
  bodyType: "json",
6697
7277
  });
6698
- return $dara.cast<$_model.RunContinueContentResponse>(await this.callApi(params, req, runtime), new $_model.RunContinueContentResponse({}));
7278
+ let sseResp = await this.callSSEApi(params, req, runtime);
7279
+
7280
+ for await (let resp of sseResp) {
7281
+ let data = JSON.parse(resp.event.data);
7282
+ yield $dara.cast<$_model.RunContinueContentResponse>({
7283
+ statusCode: resp.statusCode,
7284
+ headers: resp.headers,
7285
+ body: {
7286
+ ...data,
7287
+ RequestId: resp.event.id,
7288
+ Message: resp.event.event,
7289
+ },
7290
+ }, new $_model.RunContinueContentResponse({}));
7291
+ }
6699
7292
  }
6700
7293
 
6701
7294
  /**
6702
7295
  * 内容续写
6703
7296
  *
6704
7297
  * @param request - RunContinueContentRequest
7298
+ * @param runtime - runtime options for this request RuntimeOptions
6705
7299
  * @returns RunContinueContentResponse
6706
7300
  */
6707
- async runContinueContent(request: $_model.RunContinueContentRequest): Promise<$_model.RunContinueContentResponse> {
6708
- let runtime = new $dara.RuntimeOptions({ });
6709
- return await this.runContinueContentWithOptions(request, runtime);
6710
- }
7301
+ async runContinueContentWithOptions(request: $_model.RunContinueContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunContinueContentResponse> {
7302
+ request.validate();
7303
+ let body : {[key: string ]: any} = { };
7304
+ if (!$dara.isNull(request.content)) {
7305
+ body["Content"] = request.content;
7306
+ }
6711
7307
 
6712
- /**
7308
+ if (!$dara.isNull(request.workspaceId)) {
7309
+ body["WorkspaceId"] = request.workspaceId;
7310
+ }
7311
+
7312
+ let req = new $OpenApiUtil.OpenApiRequest({
7313
+ body: OpenApiUtil.parseToMap(body),
7314
+ });
7315
+ let params = new $OpenApiUtil.Params({
7316
+ action: "RunContinueContent",
7317
+ version: "2023-08-01",
7318
+ protocol: "HTTPS",
7319
+ pathname: "/",
7320
+ method: "POST",
7321
+ authType: "AK",
7322
+ style: "RPC",
7323
+ reqBodyType: "formData",
7324
+ bodyType: "json",
7325
+ });
7326
+ return $dara.cast<$_model.RunContinueContentResponse>(await this.callApi(params, req, runtime), new $_model.RunContinueContentResponse({}));
7327
+ }
7328
+
7329
+ /**
7330
+ * 内容续写
7331
+ *
7332
+ * @param request - RunContinueContentRequest
7333
+ * @returns RunContinueContentResponse
7334
+ */
7335
+ async runContinueContent(request: $_model.RunContinueContentRequest): Promise<$_model.RunContinueContentResponse> {
7336
+ let runtime = new $dara.RuntimeOptions({ });
7337
+ return await this.runContinueContentWithOptions(request, runtime);
7338
+ }
7339
+
7340
+ /**
7341
+ * 自定义热点话题分析
7342
+ *
7343
+ * @param request - RunCustomHotTopicAnalysisRequest
7344
+ * @param runtime - runtime options for this request RuntimeOptions
7345
+ * @returns RunCustomHotTopicAnalysisResponse
7346
+ */
7347
+ async *runCustomHotTopicAnalysisWithSSE(request: $_model.RunCustomHotTopicAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCustomHotTopicAnalysisResponse, any, unknown> {
7348
+ request.validate();
7349
+ let body : {[key: string ]: any} = { };
7350
+ if (!$dara.isNull(request.askUser)) {
7351
+ body["AskUser"] = request.askUser;
7352
+ }
7353
+
7354
+ if (!$dara.isNull(request.forceAnalysisExistsTopic)) {
7355
+ body["ForceAnalysisExistsTopic"] = request.forceAnalysisExistsTopic;
7356
+ }
7357
+
7358
+ if (!$dara.isNull(request.prompt)) {
7359
+ body["Prompt"] = request.prompt;
7360
+ }
7361
+
7362
+ if (!$dara.isNull(request.sessionId)) {
7363
+ body["SessionId"] = request.sessionId;
7364
+ }
7365
+
7366
+ if (!$dara.isNull(request.taskId)) {
7367
+ body["TaskId"] = request.taskId;
7368
+ }
7369
+
7370
+ if (!$dara.isNull(request.userBack)) {
7371
+ body["UserBack"] = request.userBack;
7372
+ }
7373
+
7374
+ if (!$dara.isNull(request.workspaceId)) {
7375
+ body["WorkspaceId"] = request.workspaceId;
7376
+ }
7377
+
7378
+ let req = new $OpenApiUtil.OpenApiRequest({
7379
+ body: OpenApiUtil.parseToMap(body),
7380
+ });
7381
+ let params = new $OpenApiUtil.Params({
7382
+ action: "RunCustomHotTopicAnalysis",
7383
+ version: "2023-08-01",
7384
+ protocol: "HTTPS",
7385
+ pathname: "/",
7386
+ method: "POST",
7387
+ authType: "AK",
7388
+ style: "RPC",
7389
+ reqBodyType: "formData",
7390
+ bodyType: "json",
7391
+ });
7392
+ let sseResp = await this.callSSEApi(params, req, runtime);
7393
+
7394
+ for await (let resp of sseResp) {
7395
+ let data = JSON.parse(resp.event.data);
7396
+ yield $dara.cast<$_model.RunCustomHotTopicAnalysisResponse>({
7397
+ statusCode: resp.statusCode,
7398
+ headers: resp.headers,
7399
+ body: {
7400
+ ...data,
7401
+ RequestId: resp.event.id,
7402
+ Message: resp.event.event,
7403
+ },
7404
+ }, new $_model.RunCustomHotTopicAnalysisResponse({}));
7405
+ }
7406
+ }
7407
+
7408
+ /**
6713
7409
  * 自定义热点话题分析
6714
7410
  *
6715
7411
  * @param request - RunCustomHotTopicAnalysisRequest
@@ -6775,6 +7471,86 @@ export default class Client extends OpenApi {
6775
7471
  return await this.runCustomHotTopicAnalysisWithOptions(request, runtime);
6776
7472
  }
6777
7473
 
7474
+ /**
7475
+ * 自定义选题视角分析
7476
+ *
7477
+ * @param request - RunCustomHotTopicViewPointAnalysisRequest
7478
+ * @param runtime - runtime options for this request RuntimeOptions
7479
+ * @returns RunCustomHotTopicViewPointAnalysisResponse
7480
+ */
7481
+ async *runCustomHotTopicViewPointAnalysisWithSSE(request: $_model.RunCustomHotTopicViewPointAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunCustomHotTopicViewPointAnalysisResponse, any, unknown> {
7482
+ request.validate();
7483
+ let body : {[key: string ]: any} = { };
7484
+ if (!$dara.isNull(request.askUser)) {
7485
+ body["AskUser"] = request.askUser;
7486
+ }
7487
+
7488
+ if (!$dara.isNull(request.prompt)) {
7489
+ body["Prompt"] = request.prompt;
7490
+ }
7491
+
7492
+ if (!$dara.isNull(request.searchQuery)) {
7493
+ body["SearchQuery"] = request.searchQuery;
7494
+ }
7495
+
7496
+ if (!$dara.isNull(request.skipAskUser)) {
7497
+ body["SkipAskUser"] = request.skipAskUser;
7498
+ }
7499
+
7500
+ if (!$dara.isNull(request.topic)) {
7501
+ body["Topic"] = request.topic;
7502
+ }
7503
+
7504
+ if (!$dara.isNull(request.topicId)) {
7505
+ body["TopicId"] = request.topicId;
7506
+ }
7507
+
7508
+ if (!$dara.isNull(request.topicSource)) {
7509
+ body["TopicSource"] = request.topicSource;
7510
+ }
7511
+
7512
+ if (!$dara.isNull(request.topicVersion)) {
7513
+ body["TopicVersion"] = request.topicVersion;
7514
+ }
7515
+
7516
+ if (!$dara.isNull(request.userBack)) {
7517
+ body["UserBack"] = request.userBack;
7518
+ }
7519
+
7520
+ if (!$dara.isNull(request.workspaceId)) {
7521
+ body["WorkspaceId"] = request.workspaceId;
7522
+ }
7523
+
7524
+ let req = new $OpenApiUtil.OpenApiRequest({
7525
+ body: OpenApiUtil.parseToMap(body),
7526
+ });
7527
+ let params = new $OpenApiUtil.Params({
7528
+ action: "RunCustomHotTopicViewPointAnalysis",
7529
+ version: "2023-08-01",
7530
+ protocol: "HTTPS",
7531
+ pathname: "/",
7532
+ method: "POST",
7533
+ authType: "AK",
7534
+ style: "RPC",
7535
+ reqBodyType: "formData",
7536
+ bodyType: "json",
7537
+ });
7538
+ let sseResp = await this.callSSEApi(params, req, runtime);
7539
+
7540
+ for await (let resp of sseResp) {
7541
+ let data = JSON.parse(resp.event.data);
7542
+ yield $dara.cast<$_model.RunCustomHotTopicViewPointAnalysisResponse>({
7543
+ statusCode: resp.statusCode,
7544
+ headers: resp.headers,
7545
+ body: {
7546
+ ...data,
7547
+ RequestId: resp.event.id,
7548
+ Message: resp.event.event,
7549
+ },
7550
+ }, new $_model.RunCustomHotTopicViewPointAnalysisResponse({}));
7551
+ }
7552
+ }
7553
+
6778
7554
  /**
6779
7555
  * 自定义选题视角分析
6780
7556
  *
@@ -6854,56 +7630,84 @@ export default class Client extends OpenApi {
6854
7630
  }
6855
7631
 
6856
7632
  /**
6857
- * 妙读脑图生成接口
7633
+ * 流式输出深度写作事件
6858
7634
  *
6859
- * @param request - RunDocBrainmapRequest
7635
+ * @param request - RunDeepWritingRequest
6860
7636
  * @param runtime - runtime options for this request RuntimeOptions
6861
- * @returns RunDocBrainmapResponse
7637
+ * @returns RunDeepWritingResponse
6862
7638
  */
6863
- async runDocBrainmapWithOptions(request: $_model.RunDocBrainmapRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocBrainmapResponse> {
7639
+ async *runDeepWritingWithSSE(request: $_model.RunDeepWritingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDeepWritingResponse, any, unknown> {
6864
7640
  request.validate();
6865
7641
  let body : {[key: string ]: any} = { };
6866
- if (!$dara.isNull(request.cleanCache)) {
6867
- body["CleanCache"] = request.cleanCache;
7642
+ if (!$dara.isNull(request.cursor)) {
7643
+ body["Cursor"] = request.cursor;
6868
7644
  }
6869
7645
 
6870
- if (!$dara.isNull(request.docId)) {
6871
- body["DocId"] = request.docId;
7646
+ if (!$dara.isNull(request.taskId)) {
7647
+ body["TaskId"] = request.taskId;
6872
7648
  }
6873
7649
 
6874
- if (!$dara.isNull(request.modelName)) {
6875
- body["ModelName"] = request.modelName;
7650
+ if (!$dara.isNull(request.workspaceId)) {
7651
+ body["WorkspaceId"] = request.workspaceId;
6876
7652
  }
6877
7653
 
6878
- if (!$dara.isNull(request.nodeNumber)) {
6879
- body["NodeNumber"] = request.nodeNumber;
6880
- }
7654
+ let req = new $OpenApiUtil.OpenApiRequest({
7655
+ body: OpenApiUtil.parseToMap(body),
7656
+ });
7657
+ let params = new $OpenApiUtil.Params({
7658
+ action: "RunDeepWriting",
7659
+ version: "2023-08-01",
7660
+ protocol: "HTTPS",
7661
+ pathname: "/",
7662
+ method: "POST",
7663
+ authType: "AK",
7664
+ style: "RPC",
7665
+ reqBodyType: "formData",
7666
+ bodyType: "json",
7667
+ });
7668
+ let sseResp = await this.callSSEApi(params, req, runtime);
6881
7669
 
6882
- if (!$dara.isNull(request.prompt)) {
6883
- body["Prompt"] = request.prompt;
7670
+ for await (let resp of sseResp) {
7671
+ let data = JSON.parse(resp.event.data);
7672
+ yield $dara.cast<$_model.RunDeepWritingResponse>({
7673
+ statusCode: resp.statusCode,
7674
+ headers: resp.headers,
7675
+ body: {
7676
+ ...data,
7677
+ RequestId: resp.event.id,
7678
+ Message: resp.event.event,
7679
+ },
7680
+ }, new $_model.RunDeepWritingResponse({}));
6884
7681
  }
7682
+ }
6885
7683
 
6886
- if (!$dara.isNull(request.sessionId)) {
6887
- body["SessionId"] = request.sessionId;
7684
+ /**
7685
+ * 流式输出深度写作事件
7686
+ *
7687
+ * @param request - RunDeepWritingRequest
7688
+ * @param runtime - runtime options for this request RuntimeOptions
7689
+ * @returns RunDeepWritingResponse
7690
+ */
7691
+ async runDeepWritingWithOptions(request: $_model.RunDeepWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDeepWritingResponse> {
7692
+ request.validate();
7693
+ let body : {[key: string ]: any} = { };
7694
+ if (!$dara.isNull(request.cursor)) {
7695
+ body["Cursor"] = request.cursor;
6888
7696
  }
6889
7697
 
6890
- if (!$dara.isNull(request.wordNumber)) {
6891
- body["WordNumber"] = request.wordNumber;
7698
+ if (!$dara.isNull(request.taskId)) {
7699
+ body["TaskId"] = request.taskId;
6892
7700
  }
6893
7701
 
6894
7702
  if (!$dara.isNull(request.workspaceId)) {
6895
7703
  body["WorkspaceId"] = request.workspaceId;
6896
7704
  }
6897
7705
 
6898
- if (!$dara.isNull(request.referenceContent)) {
6899
- body["referenceContent"] = request.referenceContent;
6900
- }
6901
-
6902
7706
  let req = new $OpenApiUtil.OpenApiRequest({
6903
7707
  body: OpenApiUtil.parseToMap(body),
6904
7708
  });
6905
7709
  let params = new $OpenApiUtil.Params({
6906
- action: "RunDocBrainmap",
7710
+ action: "RunDeepWriting",
6907
7711
  version: "2023-08-01",
6908
7712
  protocol: "HTTPS",
6909
7713
  pathname: "/",
@@ -6913,28 +7717,28 @@ export default class Client extends OpenApi {
6913
7717
  reqBodyType: "formData",
6914
7718
  bodyType: "json",
6915
7719
  });
6916
- return $dara.cast<$_model.RunDocBrainmapResponse>(await this.callApi(params, req, runtime), new $_model.RunDocBrainmapResponse({}));
7720
+ return $dara.cast<$_model.RunDeepWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunDeepWritingResponse({}));
6917
7721
  }
6918
7722
 
6919
7723
  /**
6920
- * 妙读脑图生成接口
7724
+ * 流式输出深度写作事件
6921
7725
  *
6922
- * @param request - RunDocBrainmapRequest
6923
- * @returns RunDocBrainmapResponse
7726
+ * @param request - RunDeepWritingRequest
7727
+ * @returns RunDeepWritingResponse
6924
7728
  */
6925
- async runDocBrainmap(request: $_model.RunDocBrainmapRequest): Promise<$_model.RunDocBrainmapResponse> {
7729
+ async runDeepWriting(request: $_model.RunDeepWritingRequest): Promise<$_model.RunDeepWritingResponse> {
6926
7730
  let runtime = new $dara.RuntimeOptions({ });
6927
- return await this.runDocBrainmapWithOptions(request, runtime);
7731
+ return await this.runDeepWritingWithOptions(request, runtime);
6928
7732
  }
6929
7733
 
6930
7734
  /**
6931
- * 妙读文档导读接口
7735
+ * 妙读脑图生成接口
6932
7736
  *
6933
- * @param request - RunDocIntroductionRequest
7737
+ * @param request - RunDocBrainmapRequest
6934
7738
  * @param runtime - runtime options for this request RuntimeOptions
6935
- * @returns RunDocIntroductionResponse
7739
+ * @returns RunDocBrainmapResponse
6936
7740
  */
6937
- async runDocIntroductionWithOptions(request: $_model.RunDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocIntroductionResponse> {
7741
+ async *runDocBrainmapWithSSE(request: $_model.RunDocBrainmapRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocBrainmapResponse, any, unknown> {
6938
7742
  request.validate();
6939
7743
  let body : {[key: string ]: any} = { };
6940
7744
  if (!$dara.isNull(request.cleanCache)) {
@@ -6945,24 +7749,24 @@ export default class Client extends OpenApi {
6945
7749
  body["DocId"] = request.docId;
6946
7750
  }
6947
7751
 
6948
- if (!$dara.isNull(request.introductionPrompt)) {
6949
- body["IntroductionPrompt"] = request.introductionPrompt;
7752
+ if (!$dara.isNull(request.modelName)) {
7753
+ body["ModelName"] = request.modelName;
6950
7754
  }
6951
7755
 
6952
- if (!$dara.isNull(request.keyPointPrompt)) {
6953
- body["KeyPointPrompt"] = request.keyPointPrompt;
7756
+ if (!$dara.isNull(request.nodeNumber)) {
7757
+ body["NodeNumber"] = request.nodeNumber;
6954
7758
  }
6955
7759
 
6956
- if (!$dara.isNull(request.modelName)) {
6957
- body["ModelName"] = request.modelName;
7760
+ if (!$dara.isNull(request.prompt)) {
7761
+ body["Prompt"] = request.prompt;
6958
7762
  }
6959
7763
 
6960
7764
  if (!$dara.isNull(request.sessionId)) {
6961
7765
  body["SessionId"] = request.sessionId;
6962
7766
  }
6963
7767
 
6964
- if (!$dara.isNull(request.summaryPrompt)) {
6965
- body["SummaryPrompt"] = request.summaryPrompt;
7768
+ if (!$dara.isNull(request.wordNumber)) {
7769
+ body["WordNumber"] = request.wordNumber;
6966
7770
  }
6967
7771
 
6968
7772
  if (!$dara.isNull(request.workspaceId)) {
@@ -6977,7 +7781,7 @@ export default class Client extends OpenApi {
6977
7781
  body: OpenApiUtil.parseToMap(body),
6978
7782
  });
6979
7783
  let params = new $OpenApiUtil.Params({
6980
- action: "RunDocIntroduction",
7784
+ action: "RunDocBrainmap",
6981
7785
  version: "2023-08-01",
6982
7786
  protocol: "HTTPS",
6983
7787
  pathname: "/",
@@ -6987,85 +7791,73 @@ export default class Client extends OpenApi {
6987
7791
  reqBodyType: "formData",
6988
7792
  bodyType: "json",
6989
7793
  });
6990
- return $dara.cast<$_model.RunDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunDocIntroductionResponse({}));
6991
- }
7794
+ let sseResp = await this.callSSEApi(params, req, runtime);
6992
7795
 
6993
- /**
6994
- * 妙读文档导读接口
6995
- *
6996
- * @param request - RunDocIntroductionRequest
6997
- * @returns RunDocIntroductionResponse
6998
- */
6999
- async runDocIntroduction(request: $_model.RunDocIntroductionRequest): Promise<$_model.RunDocIntroductionResponse> {
7000
- let runtime = new $dara.RuntimeOptions({ });
7001
- return await this.runDocIntroductionWithOptions(request, runtime);
7796
+ for await (let resp of sseResp) {
7797
+ let data = JSON.parse(resp.event.data);
7798
+ yield $dara.cast<$_model.RunDocBrainmapResponse>({
7799
+ statusCode: resp.statusCode,
7800
+ headers: resp.headers,
7801
+ body: {
7802
+ ...data,
7803
+ RequestId: resp.event.id,
7804
+ Message: resp.event.event,
7805
+ },
7806
+ }, new $_model.RunDocBrainmapResponse({}));
7807
+ }
7002
7808
  }
7003
7809
 
7004
7810
  /**
7005
- * 妙读问答接口
7811
+ * 妙读脑图生成接口
7006
7812
  *
7007
- * @param tmpReq - RunDocQaRequest
7813
+ * @param request - RunDocBrainmapRequest
7008
7814
  * @param runtime - runtime options for this request RuntimeOptions
7009
- * @returns RunDocQaResponse
7815
+ * @returns RunDocBrainmapResponse
7010
7816
  */
7011
- async runDocQaWithOptions(tmpReq: $_model.RunDocQaRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocQaResponse> {
7012
- tmpReq.validate();
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
-
7817
+ async runDocBrainmapWithOptions(request: $_model.RunDocBrainmapRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocBrainmapResponse> {
7818
+ request.validate();
7027
7819
  let body : {[key: string ]: any} = { };
7028
- if (!$dara.isNull(request.categoryIdsShrink)) {
7029
- body["CategoryIds"] = request.categoryIdsShrink;
7030
- }
7031
-
7032
- if (!$dara.isNull(request.conversationContextsShrink)) {
7033
- body["ConversationContexts"] = request.conversationContextsShrink;
7820
+ if (!$dara.isNull(request.cleanCache)) {
7821
+ body["CleanCache"] = request.cleanCache;
7034
7822
  }
7035
7823
 
7036
- if (!$dara.isNull(request.docIdsShrink)) {
7037
- body["DocIds"] = request.docIdsShrink;
7824
+ if (!$dara.isNull(request.docId)) {
7825
+ body["DocId"] = request.docId;
7038
7826
  }
7039
7827
 
7040
7828
  if (!$dara.isNull(request.modelName)) {
7041
7829
  body["ModelName"] = request.modelName;
7042
7830
  }
7043
7831
 
7044
- if (!$dara.isNull(request.query)) {
7045
- body["Query"] = request.query;
7046
- }
7047
-
7048
- if (!$dara.isNull(request.referenceContent)) {
7049
- body["ReferenceContent"] = request.referenceContent;
7832
+ if (!$dara.isNull(request.nodeNumber)) {
7833
+ body["NodeNumber"] = request.nodeNumber;
7050
7834
  }
7051
7835
 
7052
- if (!$dara.isNull(request.searchSource)) {
7053
- body["SearchSource"] = request.searchSource;
7836
+ if (!$dara.isNull(request.prompt)) {
7837
+ body["Prompt"] = request.prompt;
7054
7838
  }
7055
7839
 
7056
7840
  if (!$dara.isNull(request.sessionId)) {
7057
7841
  body["SessionId"] = request.sessionId;
7058
7842
  }
7059
7843
 
7844
+ if (!$dara.isNull(request.wordNumber)) {
7845
+ body["WordNumber"] = request.wordNumber;
7846
+ }
7847
+
7060
7848
  if (!$dara.isNull(request.workspaceId)) {
7061
7849
  body["WorkspaceId"] = request.workspaceId;
7062
7850
  }
7063
7851
 
7852
+ if (!$dara.isNull(request.referenceContent)) {
7853
+ body["referenceContent"] = request.referenceContent;
7854
+ }
7855
+
7064
7856
  let req = new $OpenApiUtil.OpenApiRequest({
7065
7857
  body: OpenApiUtil.parseToMap(body),
7066
7858
  });
7067
7859
  let params = new $OpenApiUtil.Params({
7068
- action: "RunDocQa",
7860
+ action: "RunDocBrainmap",
7069
7861
  version: "2023-08-01",
7070
7862
  protocol: "HTTPS",
7071
7863
  pathname: "/",
@@ -7075,55 +7867,71 @@ export default class Client extends OpenApi {
7075
7867
  reqBodyType: "formData",
7076
7868
  bodyType: "json",
7077
7869
  });
7078
- return $dara.cast<$_model.RunDocQaResponse>(await this.callApi(params, req, runtime), new $_model.RunDocQaResponse({}));
7870
+ return $dara.cast<$_model.RunDocBrainmapResponse>(await this.callApi(params, req, runtime), new $_model.RunDocBrainmapResponse({}));
7079
7871
  }
7080
7872
 
7081
7873
  /**
7082
- * 妙读问答接口
7874
+ * 妙读脑图生成接口
7083
7875
  *
7084
- * @param request - RunDocQaRequest
7085
- * @returns RunDocQaResponse
7876
+ * @param request - RunDocBrainmapRequest
7877
+ * @returns RunDocBrainmapResponse
7086
7878
  */
7087
- async runDocQa(request: $_model.RunDocQaRequest): Promise<$_model.RunDocQaResponse> {
7879
+ async runDocBrainmap(request: $_model.RunDocBrainmapRequest): Promise<$_model.RunDocBrainmapResponse> {
7088
7880
  let runtime = new $dara.RuntimeOptions({ });
7089
- return await this.runDocQaWithOptions(request, runtime);
7881
+ return await this.runDocBrainmapWithOptions(request, runtime);
7090
7882
  }
7091
7883
 
7092
7884
  /**
7093
- * 文档智能卡片接口
7885
+ * 妙读文档导读接口
7094
7886
  *
7095
- * @param request - RunDocSmartCardRequest
7887
+ * @param request - RunDocIntroductionRequest
7096
7888
  * @param runtime - runtime options for this request RuntimeOptions
7097
- * @returns RunDocSmartCardResponse
7889
+ * @returns RunDocIntroductionResponse
7098
7890
  */
7099
- async runDocSmartCardWithOptions(request: $_model.RunDocSmartCardRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSmartCardResponse> {
7891
+ async *runDocIntroductionWithSSE(request: $_model.RunDocIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocIntroductionResponse, any, unknown> {
7100
7892
  request.validate();
7101
7893
  let body : {[key: string ]: any} = { };
7894
+ if (!$dara.isNull(request.cleanCache)) {
7895
+ body["CleanCache"] = request.cleanCache;
7896
+ }
7897
+
7102
7898
  if (!$dara.isNull(request.docId)) {
7103
7899
  body["DocId"] = request.docId;
7104
7900
  }
7105
7901
 
7106
- if (!$dara.isNull(request.modelName)) {
7107
- body["ModelName"] = request.modelName;
7902
+ if (!$dara.isNull(request.introductionPrompt)) {
7903
+ body["IntroductionPrompt"] = request.introductionPrompt;
7108
7904
  }
7109
7905
 
7110
- if (!$dara.isNull(request.prompt)) {
7111
- body["Prompt"] = request.prompt;
7906
+ if (!$dara.isNull(request.keyPointPrompt)) {
7907
+ body["KeyPointPrompt"] = request.keyPointPrompt;
7908
+ }
7909
+
7910
+ if (!$dara.isNull(request.modelName)) {
7911
+ body["ModelName"] = request.modelName;
7112
7912
  }
7113
7913
 
7114
7914
  if (!$dara.isNull(request.sessionId)) {
7115
7915
  body["SessionId"] = request.sessionId;
7116
7916
  }
7117
7917
 
7918
+ if (!$dara.isNull(request.summaryPrompt)) {
7919
+ body["SummaryPrompt"] = request.summaryPrompt;
7920
+ }
7921
+
7118
7922
  if (!$dara.isNull(request.workspaceId)) {
7119
7923
  body["WorkspaceId"] = request.workspaceId;
7120
7924
  }
7121
7925
 
7926
+ if (!$dara.isNull(request.referenceContent)) {
7927
+ body["referenceContent"] = request.referenceContent;
7928
+ }
7929
+
7122
7930
  let req = new $OpenApiUtil.OpenApiRequest({
7123
7931
  body: OpenApiUtil.parseToMap(body),
7124
7932
  });
7125
7933
  let params = new $OpenApiUtil.Params({
7126
- action: "RunDocSmartCard",
7934
+ action: "RunDocIntroduction",
7127
7935
  version: "2023-08-01",
7128
7936
  protocol: "HTTPS",
7129
7937
  pathname: "/",
@@ -7133,28 +7941,30 @@ export default class Client extends OpenApi {
7133
7941
  reqBodyType: "formData",
7134
7942
  bodyType: "json",
7135
7943
  });
7136
- return $dara.cast<$_model.RunDocSmartCardResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSmartCardResponse({}));
7137
- }
7944
+ let sseResp = await this.callSSEApi(params, req, runtime);
7138
7945
 
7139
- /**
7140
- * 文档智能卡片接口
7141
- *
7142
- * @param request - RunDocSmartCardRequest
7143
- * @returns RunDocSmartCardResponse
7144
- */
7145
- async runDocSmartCard(request: $_model.RunDocSmartCardRequest): Promise<$_model.RunDocSmartCardResponse> {
7146
- let runtime = new $dara.RuntimeOptions({ });
7147
- return await this.runDocSmartCardWithOptions(request, runtime);
7946
+ for await (let resp of sseResp) {
7947
+ let data = JSON.parse(resp.event.data);
7948
+ yield $dara.cast<$_model.RunDocIntroductionResponse>({
7949
+ statusCode: resp.statusCode,
7950
+ headers: resp.headers,
7951
+ body: {
7952
+ ...data,
7953
+ RequestId: resp.event.id,
7954
+ Message: resp.event.event,
7955
+ },
7956
+ }, new $_model.RunDocIntroductionResponse({}));
7957
+ }
7148
7958
  }
7149
7959
 
7150
7960
  /**
7151
- * 妙读文档总结摘要接口
7961
+ * 妙读文档导读接口
7152
7962
  *
7153
- * @param request - RunDocSummaryRequest
7963
+ * @param request - RunDocIntroductionRequest
7154
7964
  * @param runtime - runtime options for this request RuntimeOptions
7155
- * @returns RunDocSummaryResponse
7965
+ * @returns RunDocIntroductionResponse
7156
7966
  */
7157
- async runDocSummaryWithOptions(request: $_model.RunDocSummaryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSummaryResponse> {
7967
+ async runDocIntroductionWithOptions(request: $_model.RunDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocIntroductionResponse> {
7158
7968
  request.validate();
7159
7969
  let body : {[key: string ]: any} = { };
7160
7970
  if (!$dara.isNull(request.cleanCache)) {
@@ -7165,31 +7975,39 @@ export default class Client extends OpenApi {
7165
7975
  body["DocId"] = request.docId;
7166
7976
  }
7167
7977
 
7168
- if (!$dara.isNull(request.modelName)) {
7169
- body["ModelName"] = request.modelName;
7978
+ if (!$dara.isNull(request.introductionPrompt)) {
7979
+ body["IntroductionPrompt"] = request.introductionPrompt;
7170
7980
  }
7171
7981
 
7172
- if (!$dara.isNull(request.query)) {
7173
- body["Query"] = request.query;
7982
+ if (!$dara.isNull(request.keyPointPrompt)) {
7983
+ body["KeyPointPrompt"] = request.keyPointPrompt;
7174
7984
  }
7175
7985
 
7176
- if (!$dara.isNull(request.recommendContent)) {
7177
- body["RecommendContent"] = request.recommendContent;
7986
+ if (!$dara.isNull(request.modelName)) {
7987
+ body["ModelName"] = request.modelName;
7178
7988
  }
7179
7989
 
7180
7990
  if (!$dara.isNull(request.sessionId)) {
7181
7991
  body["SessionId"] = request.sessionId;
7182
7992
  }
7183
7993
 
7994
+ if (!$dara.isNull(request.summaryPrompt)) {
7995
+ body["SummaryPrompt"] = request.summaryPrompt;
7996
+ }
7997
+
7184
7998
  if (!$dara.isNull(request.workspaceId)) {
7185
7999
  body["WorkspaceId"] = request.workspaceId;
7186
8000
  }
7187
8001
 
8002
+ if (!$dara.isNull(request.referenceContent)) {
8003
+ body["referenceContent"] = request.referenceContent;
8004
+ }
8005
+
7188
8006
  let req = new $OpenApiUtil.OpenApiRequest({
7189
8007
  body: OpenApiUtil.parseToMap(body),
7190
8008
  });
7191
8009
  let params = new $OpenApiUtil.Params({
7192
- action: "RunDocSummary",
8010
+ action: "RunDocIntroduction",
7193
8011
  version: "2023-08-01",
7194
8012
  protocol: "HTTPS",
7195
8013
  pathname: "/",
@@ -7199,52 +8017,74 @@ export default class Client extends OpenApi {
7199
8017
  reqBodyType: "formData",
7200
8018
  bodyType: "json",
7201
8019
  });
7202
- return $dara.cast<$_model.RunDocSummaryResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSummaryResponse({}));
8020
+ return $dara.cast<$_model.RunDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunDocIntroductionResponse({}));
7203
8021
  }
7204
8022
 
7205
8023
  /**
7206
- * 妙读文档总结摘要接口
8024
+ * 妙读文档导读接口
7207
8025
  *
7208
- * @param request - RunDocSummaryRequest
7209
- * @returns RunDocSummaryResponse
8026
+ * @param request - RunDocIntroductionRequest
8027
+ * @returns RunDocIntroductionResponse
7210
8028
  */
7211
- async runDocSummary(request: $_model.RunDocSummaryRequest): Promise<$_model.RunDocSummaryResponse> {
8029
+ async runDocIntroduction(request: $_model.RunDocIntroductionRequest): Promise<$_model.RunDocIntroductionResponse> {
7212
8030
  let runtime = new $dara.RuntimeOptions({ });
7213
- return await this.runDocSummaryWithOptions(request, runtime);
8031
+ return await this.runDocIntroductionWithOptions(request, runtime);
7214
8032
  }
7215
8033
 
7216
8034
  /**
7217
- * 妙读文档翻译接口
8035
+ * 妙读问答接口
7218
8036
  *
7219
- * @param request - RunDocTranslationRequest
8037
+ * @param tmpReq - RunDocQaRequest
7220
8038
  * @param runtime - runtime options for this request RuntimeOptions
7221
- * @returns RunDocTranslationResponse
8039
+ * @returns RunDocQaResponse
7222
8040
  */
7223
- async runDocTranslationWithOptions(request: $_model.RunDocTranslationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocTranslationResponse> {
7224
- request.validate();
8041
+ async *runDocQaWithSSE(tmpReq: $_model.RunDocQaRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocQaResponse, any, unknown> {
8042
+ tmpReq.validate();
8043
+ let request = new $_model.RunDocQaShrinkRequest({ });
8044
+ OpenApiUtil.convert(tmpReq, request);
8045
+ if (!$dara.isNull(tmpReq.categoryIds)) {
8046
+ request.categoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.categoryIds, "CategoryIds", "json");
8047
+ }
8048
+
8049
+ if (!$dara.isNull(tmpReq.conversationContexts)) {
8050
+ request.conversationContextsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conversationContexts, "ConversationContexts", "json");
8051
+ }
8052
+
8053
+ if (!$dara.isNull(tmpReq.docIds)) {
8054
+ request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
8055
+ }
8056
+
7225
8057
  let body : {[key: string ]: any} = { };
7226
- if (!$dara.isNull(request.cleanCache)) {
7227
- body["CleanCache"] = request.cleanCache;
8058
+ if (!$dara.isNull(request.categoryIdsShrink)) {
8059
+ body["CategoryIds"] = request.categoryIdsShrink;
7228
8060
  }
7229
8061
 
7230
- if (!$dara.isNull(request.docId)) {
7231
- body["DocId"] = request.docId;
8062
+ if (!$dara.isNull(request.conversationContextsShrink)) {
8063
+ body["ConversationContexts"] = request.conversationContextsShrink;
8064
+ }
8065
+
8066
+ if (!$dara.isNull(request.docIdsShrink)) {
8067
+ body["DocIds"] = request.docIdsShrink;
7232
8068
  }
7233
8069
 
7234
8070
  if (!$dara.isNull(request.modelName)) {
7235
8071
  body["ModelName"] = request.modelName;
7236
8072
  }
7237
8073
 
7238
- if (!$dara.isNull(request.recommendContent)) {
7239
- body["RecommendContent"] = request.recommendContent;
8074
+ if (!$dara.isNull(request.query)) {
8075
+ body["Query"] = request.query;
7240
8076
  }
7241
8077
 
7242
- if (!$dara.isNull(request.sessionId)) {
7243
- body["SessionId"] = request.sessionId;
8078
+ if (!$dara.isNull(request.referenceContent)) {
8079
+ body["ReferenceContent"] = request.referenceContent;
7244
8080
  }
7245
8081
 
7246
- if (!$dara.isNull(request.transType)) {
7247
- body["TransType"] = request.transType;
8082
+ if (!$dara.isNull(request.searchSource)) {
8083
+ body["SearchSource"] = request.searchSource;
8084
+ }
8085
+
8086
+ if (!$dara.isNull(request.sessionId)) {
8087
+ body["SessionId"] = request.sessionId;
7248
8088
  }
7249
8089
 
7250
8090
  if (!$dara.isNull(request.workspaceId)) {
@@ -7255,7 +8095,7 @@ export default class Client extends OpenApi {
7255
8095
  body: OpenApiUtil.parseToMap(body),
7256
8096
  });
7257
8097
  let params = new $OpenApiUtil.Params({
7258
- action: "RunDocTranslation",
8098
+ action: "RunDocQa",
7259
8099
  version: "2023-08-01",
7260
8100
  protocol: "HTTPS",
7261
8101
  pathname: "/",
@@ -7265,71 +8105,1789 @@ export default class Client extends OpenApi {
7265
8105
  reqBodyType: "formData",
7266
8106
  bodyType: "json",
7267
8107
  });
7268
- return $dara.cast<$_model.RunDocTranslationResponse>(await this.callApi(params, req, runtime), new $_model.RunDocTranslationResponse({}));
7269
- }
8108
+ let sseResp = await this.callSSEApi(params, req, runtime);
7270
8109
 
7271
- /**
7272
- * 妙读文档翻译接口
7273
- *
7274
- * @param request - RunDocTranslationRequest
7275
- * @returns RunDocTranslationResponse
7276
- */
7277
- async runDocTranslation(request: $_model.RunDocTranslationRequest): Promise<$_model.RunDocTranslationResponse> {
7278
- let runtime = new $dara.RuntimeOptions({ });
7279
- return await this.runDocTranslationWithOptions(request, runtime);
8110
+ for await (let resp of sseResp) {
8111
+ let data = JSON.parse(resp.event.data);
8112
+ yield $dara.cast<$_model.RunDocQaResponse>({
8113
+ statusCode: resp.statusCode,
8114
+ headers: resp.headers,
8115
+ body: {
8116
+ ...data,
8117
+ RequestId: resp.event.id,
8118
+ Message: resp.event.event,
8119
+ },
8120
+ }, new $_model.RunDocQaResponse({}));
8121
+ }
7280
8122
  }
7281
8123
 
7282
8124
  /**
7283
- * 文档改写
8125
+ * 妙读问答接口
7284
8126
  *
7285
- * @param request - RunDocWashingRequest
8127
+ * @param tmpReq - RunDocQaRequest
7286
8128
  * @param runtime - runtime options for this request RuntimeOptions
7287
- * @returns RunDocWashingResponse
8129
+ * @returns RunDocQaResponse
7288
8130
  */
7289
- async runDocWashingWithOptions(request: $_model.RunDocWashingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocWashingResponse> {
7290
- request.validate();
8131
+ async runDocQaWithOptions(tmpReq: $_model.RunDocQaRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocQaResponse> {
8132
+ tmpReq.validate();
8133
+ let request = new $_model.RunDocQaShrinkRequest({ });
8134
+ OpenApiUtil.convert(tmpReq, request);
8135
+ if (!$dara.isNull(tmpReq.categoryIds)) {
8136
+ request.categoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.categoryIds, "CategoryIds", "json");
8137
+ }
8138
+
8139
+ if (!$dara.isNull(tmpReq.conversationContexts)) {
8140
+ request.conversationContextsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conversationContexts, "ConversationContexts", "json");
8141
+ }
8142
+
8143
+ if (!$dara.isNull(tmpReq.docIds)) {
8144
+ request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
8145
+ }
8146
+
7291
8147
  let body : {[key: string ]: any} = { };
7292
- if (!$dara.isNull(request.modelId)) {
7293
- body["ModelId"] = request.modelId;
8148
+ if (!$dara.isNull(request.categoryIdsShrink)) {
8149
+ body["CategoryIds"] = request.categoryIdsShrink;
7294
8150
  }
7295
8151
 
7296
- if (!$dara.isNull(request.prompt)) {
7297
- body["Prompt"] = request.prompt;
8152
+ if (!$dara.isNull(request.conversationContextsShrink)) {
8153
+ body["ConversationContexts"] = request.conversationContextsShrink;
7298
8154
  }
7299
8155
 
7300
- if (!$dara.isNull(request.referenceContent)) {
7301
- body["ReferenceContent"] = request.referenceContent;
8156
+ if (!$dara.isNull(request.docIdsShrink)) {
8157
+ body["DocIds"] = request.docIdsShrink;
7302
8158
  }
7303
8159
 
7304
- if (!$dara.isNull(request.sessionId)) {
7305
- body["SessionId"] = request.sessionId;
8160
+ if (!$dara.isNull(request.modelName)) {
8161
+ body["ModelName"] = request.modelName;
7306
8162
  }
7307
8163
 
7308
- if (!$dara.isNull(request.topic)) {
7309
- body["Topic"] = request.topic;
8164
+ if (!$dara.isNull(request.query)) {
8165
+ body["Query"] = request.query;
8166
+ }
8167
+
8168
+ if (!$dara.isNull(request.referenceContent)) {
8169
+ body["ReferenceContent"] = request.referenceContent;
8170
+ }
8171
+
8172
+ if (!$dara.isNull(request.searchSource)) {
8173
+ body["SearchSource"] = request.searchSource;
8174
+ }
8175
+
8176
+ if (!$dara.isNull(request.sessionId)) {
8177
+ body["SessionId"] = request.sessionId;
8178
+ }
8179
+
8180
+ if (!$dara.isNull(request.workspaceId)) {
8181
+ body["WorkspaceId"] = request.workspaceId;
8182
+ }
8183
+
8184
+ let req = new $OpenApiUtil.OpenApiRequest({
8185
+ body: OpenApiUtil.parseToMap(body),
8186
+ });
8187
+ let params = new $OpenApiUtil.Params({
8188
+ action: "RunDocQa",
8189
+ version: "2023-08-01",
8190
+ protocol: "HTTPS",
8191
+ pathname: "/",
8192
+ method: "POST",
8193
+ authType: "AK",
8194
+ style: "RPC",
8195
+ reqBodyType: "formData",
8196
+ bodyType: "json",
8197
+ });
8198
+ return $dara.cast<$_model.RunDocQaResponse>(await this.callApi(params, req, runtime), new $_model.RunDocQaResponse({}));
8199
+ }
8200
+
8201
+ /**
8202
+ * 妙读问答接口
8203
+ *
8204
+ * @param request - RunDocQaRequest
8205
+ * @returns RunDocQaResponse
8206
+ */
8207
+ async runDocQa(request: $_model.RunDocQaRequest): Promise<$_model.RunDocQaResponse> {
8208
+ let runtime = new $dara.RuntimeOptions({ });
8209
+ return await this.runDocQaWithOptions(request, runtime);
8210
+ }
8211
+
8212
+ /**
8213
+ * 文档智能卡片接口
8214
+ *
8215
+ * @param request - RunDocSmartCardRequest
8216
+ * @param runtime - runtime options for this request RuntimeOptions
8217
+ * @returns RunDocSmartCardResponse
8218
+ */
8219
+ async *runDocSmartCardWithSSE(request: $_model.RunDocSmartCardRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocSmartCardResponse, any, unknown> {
8220
+ request.validate();
8221
+ let body : {[key: string ]: any} = { };
8222
+ if (!$dara.isNull(request.docId)) {
8223
+ body["DocId"] = request.docId;
8224
+ }
8225
+
8226
+ if (!$dara.isNull(request.modelName)) {
8227
+ body["ModelName"] = request.modelName;
8228
+ }
8229
+
8230
+ if (!$dara.isNull(request.prompt)) {
8231
+ body["Prompt"] = request.prompt;
8232
+ }
8233
+
8234
+ if (!$dara.isNull(request.sessionId)) {
8235
+ body["SessionId"] = request.sessionId;
8236
+ }
8237
+
8238
+ if (!$dara.isNull(request.workspaceId)) {
8239
+ body["WorkspaceId"] = request.workspaceId;
8240
+ }
8241
+
8242
+ let req = new $OpenApiUtil.OpenApiRequest({
8243
+ body: OpenApiUtil.parseToMap(body),
8244
+ });
8245
+ let params = new $OpenApiUtil.Params({
8246
+ action: "RunDocSmartCard",
8247
+ version: "2023-08-01",
8248
+ protocol: "HTTPS",
8249
+ pathname: "/",
8250
+ method: "POST",
8251
+ authType: "AK",
8252
+ style: "RPC",
8253
+ reqBodyType: "formData",
8254
+ bodyType: "json",
8255
+ });
8256
+ let sseResp = await this.callSSEApi(params, req, runtime);
8257
+
8258
+ for await (let resp of sseResp) {
8259
+ let data = JSON.parse(resp.event.data);
8260
+ yield $dara.cast<$_model.RunDocSmartCardResponse>({
8261
+ statusCode: resp.statusCode,
8262
+ headers: resp.headers,
8263
+ body: {
8264
+ ...data,
8265
+ RequestId: resp.event.id,
8266
+ Message: resp.event.event,
8267
+ },
8268
+ }, new $_model.RunDocSmartCardResponse({}));
8269
+ }
8270
+ }
8271
+
8272
+ /**
8273
+ * 文档智能卡片接口
8274
+ *
8275
+ * @param request - RunDocSmartCardRequest
8276
+ * @param runtime - runtime options for this request RuntimeOptions
8277
+ * @returns RunDocSmartCardResponse
8278
+ */
8279
+ async runDocSmartCardWithOptions(request: $_model.RunDocSmartCardRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSmartCardResponse> {
8280
+ request.validate();
8281
+ let body : {[key: string ]: any} = { };
8282
+ if (!$dara.isNull(request.docId)) {
8283
+ body["DocId"] = request.docId;
8284
+ }
8285
+
8286
+ if (!$dara.isNull(request.modelName)) {
8287
+ body["ModelName"] = request.modelName;
8288
+ }
8289
+
8290
+ if (!$dara.isNull(request.prompt)) {
8291
+ body["Prompt"] = request.prompt;
8292
+ }
8293
+
8294
+ if (!$dara.isNull(request.sessionId)) {
8295
+ body["SessionId"] = request.sessionId;
8296
+ }
8297
+
8298
+ if (!$dara.isNull(request.workspaceId)) {
8299
+ body["WorkspaceId"] = request.workspaceId;
8300
+ }
8301
+
8302
+ let req = new $OpenApiUtil.OpenApiRequest({
8303
+ body: OpenApiUtil.parseToMap(body),
8304
+ });
8305
+ let params = new $OpenApiUtil.Params({
8306
+ action: "RunDocSmartCard",
8307
+ version: "2023-08-01",
8308
+ protocol: "HTTPS",
8309
+ pathname: "/",
8310
+ method: "POST",
8311
+ authType: "AK",
8312
+ style: "RPC",
8313
+ reqBodyType: "formData",
8314
+ bodyType: "json",
8315
+ });
8316
+ return $dara.cast<$_model.RunDocSmartCardResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSmartCardResponse({}));
8317
+ }
8318
+
8319
+ /**
8320
+ * 文档智能卡片接口
8321
+ *
8322
+ * @param request - RunDocSmartCardRequest
8323
+ * @returns RunDocSmartCardResponse
8324
+ */
8325
+ async runDocSmartCard(request: $_model.RunDocSmartCardRequest): Promise<$_model.RunDocSmartCardResponse> {
8326
+ let runtime = new $dara.RuntimeOptions({ });
8327
+ return await this.runDocSmartCardWithOptions(request, runtime);
8328
+ }
8329
+
8330
+ /**
8331
+ * 妙读文档总结摘要接口
8332
+ *
8333
+ * @param request - RunDocSummaryRequest
8334
+ * @param runtime - runtime options for this request RuntimeOptions
8335
+ * @returns RunDocSummaryResponse
8336
+ */
8337
+ async *runDocSummaryWithSSE(request: $_model.RunDocSummaryRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocSummaryResponse, any, unknown> {
8338
+ request.validate();
8339
+ let body : {[key: string ]: any} = { };
8340
+ if (!$dara.isNull(request.cleanCache)) {
8341
+ body["CleanCache"] = request.cleanCache;
8342
+ }
8343
+
8344
+ if (!$dara.isNull(request.docId)) {
8345
+ body["DocId"] = request.docId;
8346
+ }
8347
+
8348
+ if (!$dara.isNull(request.modelName)) {
8349
+ body["ModelName"] = request.modelName;
8350
+ }
8351
+
8352
+ if (!$dara.isNull(request.query)) {
8353
+ body["Query"] = request.query;
8354
+ }
8355
+
8356
+ if (!$dara.isNull(request.recommendContent)) {
8357
+ body["RecommendContent"] = request.recommendContent;
8358
+ }
8359
+
8360
+ if (!$dara.isNull(request.sessionId)) {
8361
+ body["SessionId"] = request.sessionId;
8362
+ }
8363
+
8364
+ if (!$dara.isNull(request.workspaceId)) {
8365
+ body["WorkspaceId"] = request.workspaceId;
8366
+ }
8367
+
8368
+ let req = new $OpenApiUtil.OpenApiRequest({
8369
+ body: OpenApiUtil.parseToMap(body),
8370
+ });
8371
+ let params = new $OpenApiUtil.Params({
8372
+ action: "RunDocSummary",
8373
+ version: "2023-08-01",
8374
+ protocol: "HTTPS",
8375
+ pathname: "/",
8376
+ method: "POST",
8377
+ authType: "AK",
8378
+ style: "RPC",
8379
+ reqBodyType: "formData",
8380
+ bodyType: "json",
8381
+ });
8382
+ let sseResp = await this.callSSEApi(params, req, runtime);
8383
+
8384
+ for await (let resp of sseResp) {
8385
+ let data = JSON.parse(resp.event.data);
8386
+ yield $dara.cast<$_model.RunDocSummaryResponse>({
8387
+ statusCode: resp.statusCode,
8388
+ headers: resp.headers,
8389
+ body: {
8390
+ ...data,
8391
+ RequestId: resp.event.id,
8392
+ Message: resp.event.event,
8393
+ },
8394
+ }, new $_model.RunDocSummaryResponse({}));
8395
+ }
8396
+ }
8397
+
8398
+ /**
8399
+ * 妙读文档总结摘要接口
8400
+ *
8401
+ * @param request - RunDocSummaryRequest
8402
+ * @param runtime - runtime options for this request RuntimeOptions
8403
+ * @returns RunDocSummaryResponse
8404
+ */
8405
+ async runDocSummaryWithOptions(request: $_model.RunDocSummaryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocSummaryResponse> {
8406
+ request.validate();
8407
+ let body : {[key: string ]: any} = { };
8408
+ if (!$dara.isNull(request.cleanCache)) {
8409
+ body["CleanCache"] = request.cleanCache;
8410
+ }
8411
+
8412
+ if (!$dara.isNull(request.docId)) {
8413
+ body["DocId"] = request.docId;
8414
+ }
8415
+
8416
+ if (!$dara.isNull(request.modelName)) {
8417
+ body["ModelName"] = request.modelName;
8418
+ }
8419
+
8420
+ if (!$dara.isNull(request.query)) {
8421
+ body["Query"] = request.query;
8422
+ }
8423
+
8424
+ if (!$dara.isNull(request.recommendContent)) {
8425
+ body["RecommendContent"] = request.recommendContent;
8426
+ }
8427
+
8428
+ if (!$dara.isNull(request.sessionId)) {
8429
+ body["SessionId"] = request.sessionId;
8430
+ }
8431
+
8432
+ if (!$dara.isNull(request.workspaceId)) {
8433
+ body["WorkspaceId"] = request.workspaceId;
8434
+ }
8435
+
8436
+ let req = new $OpenApiUtil.OpenApiRequest({
8437
+ body: OpenApiUtil.parseToMap(body),
8438
+ });
8439
+ let params = new $OpenApiUtil.Params({
8440
+ action: "RunDocSummary",
8441
+ version: "2023-08-01",
8442
+ protocol: "HTTPS",
8443
+ pathname: "/",
8444
+ method: "POST",
8445
+ authType: "AK",
8446
+ style: "RPC",
8447
+ reqBodyType: "formData",
8448
+ bodyType: "json",
8449
+ });
8450
+ return $dara.cast<$_model.RunDocSummaryResponse>(await this.callApi(params, req, runtime), new $_model.RunDocSummaryResponse({}));
8451
+ }
8452
+
8453
+ /**
8454
+ * 妙读文档总结摘要接口
8455
+ *
8456
+ * @param request - RunDocSummaryRequest
8457
+ * @returns RunDocSummaryResponse
8458
+ */
8459
+ async runDocSummary(request: $_model.RunDocSummaryRequest): Promise<$_model.RunDocSummaryResponse> {
8460
+ let runtime = new $dara.RuntimeOptions({ });
8461
+ return await this.runDocSummaryWithOptions(request, runtime);
8462
+ }
8463
+
8464
+ /**
8465
+ * 妙读文档翻译接口
8466
+ *
8467
+ * @param request - RunDocTranslationRequest
8468
+ * @param runtime - runtime options for this request RuntimeOptions
8469
+ * @returns RunDocTranslationResponse
8470
+ */
8471
+ async *runDocTranslationWithSSE(request: $_model.RunDocTranslationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocTranslationResponse, any, unknown> {
8472
+ request.validate();
8473
+ let body : {[key: string ]: any} = { };
8474
+ if (!$dara.isNull(request.cleanCache)) {
8475
+ body["CleanCache"] = request.cleanCache;
8476
+ }
8477
+
8478
+ if (!$dara.isNull(request.docId)) {
8479
+ body["DocId"] = request.docId;
8480
+ }
8481
+
8482
+ if (!$dara.isNull(request.modelName)) {
8483
+ body["ModelName"] = request.modelName;
8484
+ }
8485
+
8486
+ if (!$dara.isNull(request.recommendContent)) {
8487
+ body["RecommendContent"] = request.recommendContent;
8488
+ }
8489
+
8490
+ if (!$dara.isNull(request.sessionId)) {
8491
+ body["SessionId"] = request.sessionId;
8492
+ }
8493
+
8494
+ if (!$dara.isNull(request.transType)) {
8495
+ body["TransType"] = request.transType;
8496
+ }
8497
+
8498
+ if (!$dara.isNull(request.workspaceId)) {
8499
+ body["WorkspaceId"] = request.workspaceId;
8500
+ }
8501
+
8502
+ let req = new $OpenApiUtil.OpenApiRequest({
8503
+ body: OpenApiUtil.parseToMap(body),
8504
+ });
8505
+ let params = new $OpenApiUtil.Params({
8506
+ action: "RunDocTranslation",
8507
+ version: "2023-08-01",
8508
+ protocol: "HTTPS",
8509
+ pathname: "/",
8510
+ method: "POST",
8511
+ authType: "AK",
8512
+ style: "RPC",
8513
+ reqBodyType: "formData",
8514
+ bodyType: "json",
8515
+ });
8516
+ let sseResp = await this.callSSEApi(params, req, runtime);
8517
+
8518
+ for await (let resp of sseResp) {
8519
+ let data = JSON.parse(resp.event.data);
8520
+ yield $dara.cast<$_model.RunDocTranslationResponse>({
8521
+ statusCode: resp.statusCode,
8522
+ headers: resp.headers,
8523
+ body: {
8524
+ ...data,
8525
+ RequestId: resp.event.id,
8526
+ Message: resp.event.event,
8527
+ },
8528
+ }, new $_model.RunDocTranslationResponse({}));
8529
+ }
8530
+ }
8531
+
8532
+ /**
8533
+ * 妙读文档翻译接口
8534
+ *
8535
+ * @param request - RunDocTranslationRequest
8536
+ * @param runtime - runtime options for this request RuntimeOptions
8537
+ * @returns RunDocTranslationResponse
8538
+ */
8539
+ async runDocTranslationWithOptions(request: $_model.RunDocTranslationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocTranslationResponse> {
8540
+ request.validate();
8541
+ let body : {[key: string ]: any} = { };
8542
+ if (!$dara.isNull(request.cleanCache)) {
8543
+ body["CleanCache"] = request.cleanCache;
8544
+ }
8545
+
8546
+ if (!$dara.isNull(request.docId)) {
8547
+ body["DocId"] = request.docId;
8548
+ }
8549
+
8550
+ if (!$dara.isNull(request.modelName)) {
8551
+ body["ModelName"] = request.modelName;
8552
+ }
8553
+
8554
+ if (!$dara.isNull(request.recommendContent)) {
8555
+ body["RecommendContent"] = request.recommendContent;
8556
+ }
8557
+
8558
+ if (!$dara.isNull(request.sessionId)) {
8559
+ body["SessionId"] = request.sessionId;
8560
+ }
8561
+
8562
+ if (!$dara.isNull(request.transType)) {
8563
+ body["TransType"] = request.transType;
8564
+ }
8565
+
8566
+ if (!$dara.isNull(request.workspaceId)) {
8567
+ body["WorkspaceId"] = request.workspaceId;
8568
+ }
8569
+
8570
+ let req = new $OpenApiUtil.OpenApiRequest({
8571
+ body: OpenApiUtil.parseToMap(body),
8572
+ });
8573
+ let params = new $OpenApiUtil.Params({
8574
+ action: "RunDocTranslation",
8575
+ version: "2023-08-01",
8576
+ protocol: "HTTPS",
8577
+ pathname: "/",
8578
+ method: "POST",
8579
+ authType: "AK",
8580
+ style: "RPC",
8581
+ reqBodyType: "formData",
8582
+ bodyType: "json",
8583
+ });
8584
+ return $dara.cast<$_model.RunDocTranslationResponse>(await this.callApi(params, req, runtime), new $_model.RunDocTranslationResponse({}));
8585
+ }
8586
+
8587
+ /**
8588
+ * 妙读文档翻译接口
8589
+ *
8590
+ * @param request - RunDocTranslationRequest
8591
+ * @returns RunDocTranslationResponse
8592
+ */
8593
+ async runDocTranslation(request: $_model.RunDocTranslationRequest): Promise<$_model.RunDocTranslationResponse> {
8594
+ let runtime = new $dara.RuntimeOptions({ });
8595
+ return await this.runDocTranslationWithOptions(request, runtime);
8596
+ }
8597
+
8598
+ /**
8599
+ * 文档改写
8600
+ *
8601
+ * @param request - RunDocWashingRequest
8602
+ * @param runtime - runtime options for this request RuntimeOptions
8603
+ * @returns RunDocWashingResponse
8604
+ */
8605
+ async *runDocWashingWithSSE(request: $_model.RunDocWashingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunDocWashingResponse, any, unknown> {
8606
+ request.validate();
8607
+ let body : {[key: string ]: any} = { };
8608
+ if (!$dara.isNull(request.modelId)) {
8609
+ body["ModelId"] = request.modelId;
8610
+ }
8611
+
8612
+ if (!$dara.isNull(request.prompt)) {
8613
+ body["Prompt"] = request.prompt;
8614
+ }
8615
+
8616
+ if (!$dara.isNull(request.referenceContent)) {
8617
+ body["ReferenceContent"] = request.referenceContent;
8618
+ }
8619
+
8620
+ if (!$dara.isNull(request.sessionId)) {
8621
+ body["SessionId"] = request.sessionId;
8622
+ }
8623
+
8624
+ if (!$dara.isNull(request.topic)) {
8625
+ body["Topic"] = request.topic;
8626
+ }
8627
+
8628
+ if (!$dara.isNull(request.wordNumber)) {
8629
+ body["WordNumber"] = request.wordNumber;
8630
+ }
8631
+
8632
+ if (!$dara.isNull(request.workspaceId)) {
8633
+ body["WorkspaceId"] = request.workspaceId;
8634
+ }
8635
+
8636
+ if (!$dara.isNull(request.writingTypeName)) {
8637
+ body["WritingTypeName"] = request.writingTypeName;
8638
+ }
8639
+
8640
+ if (!$dara.isNull(request.writingTypeRefDoc)) {
8641
+ body["WritingTypeRefDoc"] = request.writingTypeRefDoc;
8642
+ }
8643
+
8644
+ let req = new $OpenApiUtil.OpenApiRequest({
8645
+ body: OpenApiUtil.parseToMap(body),
8646
+ });
8647
+ let params = new $OpenApiUtil.Params({
8648
+ action: "RunDocWashing",
8649
+ version: "2023-08-01",
8650
+ protocol: "HTTPS",
8651
+ pathname: "/",
8652
+ method: "POST",
8653
+ authType: "AK",
8654
+ style: "RPC",
8655
+ reqBodyType: "formData",
8656
+ bodyType: "json",
8657
+ });
8658
+ let sseResp = await this.callSSEApi(params, req, runtime);
8659
+
8660
+ for await (let resp of sseResp) {
8661
+ let data = JSON.parse(resp.event.data);
8662
+ yield $dara.cast<$_model.RunDocWashingResponse>({
8663
+ statusCode: resp.statusCode,
8664
+ headers: resp.headers,
8665
+ body: {
8666
+ ...data,
8667
+ RequestId: resp.event.id,
8668
+ Message: resp.event.event,
8669
+ },
8670
+ }, new $_model.RunDocWashingResponse({}));
8671
+ }
8672
+ }
8673
+
8674
+ /**
8675
+ * 文档改写
8676
+ *
8677
+ * @param request - RunDocWashingRequest
8678
+ * @param runtime - runtime options for this request RuntimeOptions
8679
+ * @returns RunDocWashingResponse
8680
+ */
8681
+ async runDocWashingWithOptions(request: $_model.RunDocWashingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunDocWashingResponse> {
8682
+ request.validate();
8683
+ let body : {[key: string ]: any} = { };
8684
+ if (!$dara.isNull(request.modelId)) {
8685
+ body["ModelId"] = request.modelId;
8686
+ }
8687
+
8688
+ if (!$dara.isNull(request.prompt)) {
8689
+ body["Prompt"] = request.prompt;
8690
+ }
8691
+
8692
+ if (!$dara.isNull(request.referenceContent)) {
8693
+ body["ReferenceContent"] = request.referenceContent;
8694
+ }
8695
+
8696
+ if (!$dara.isNull(request.sessionId)) {
8697
+ body["SessionId"] = request.sessionId;
8698
+ }
8699
+
8700
+ if (!$dara.isNull(request.topic)) {
8701
+ body["Topic"] = request.topic;
8702
+ }
8703
+
8704
+ if (!$dara.isNull(request.wordNumber)) {
8705
+ body["WordNumber"] = request.wordNumber;
8706
+ }
8707
+
8708
+ if (!$dara.isNull(request.workspaceId)) {
8709
+ body["WorkspaceId"] = request.workspaceId;
8710
+ }
8711
+
8712
+ if (!$dara.isNull(request.writingTypeName)) {
8713
+ body["WritingTypeName"] = request.writingTypeName;
8714
+ }
8715
+
8716
+ if (!$dara.isNull(request.writingTypeRefDoc)) {
8717
+ body["WritingTypeRefDoc"] = request.writingTypeRefDoc;
8718
+ }
8719
+
8720
+ let req = new $OpenApiUtil.OpenApiRequest({
8721
+ body: OpenApiUtil.parseToMap(body),
8722
+ });
8723
+ let params = new $OpenApiUtil.Params({
8724
+ action: "RunDocWashing",
8725
+ version: "2023-08-01",
8726
+ protocol: "HTTPS",
8727
+ pathname: "/",
8728
+ method: "POST",
8729
+ authType: "AK",
8730
+ style: "RPC",
8731
+ reqBodyType: "formData",
8732
+ bodyType: "json",
8733
+ });
8734
+ return $dara.cast<$_model.RunDocWashingResponse>(await this.callApi(params, req, runtime), new $_model.RunDocWashingResponse({}));
8735
+ }
8736
+
8737
+ /**
8738
+ * 文档改写
8739
+ *
8740
+ * @param request - RunDocWashingRequest
8741
+ * @returns RunDocWashingResponse
8742
+ */
8743
+ async runDocWashing(request: $_model.RunDocWashingRequest): Promise<$_model.RunDocWashingResponse> {
8744
+ let runtime = new $dara.RuntimeOptions({ });
8745
+ return await this.runDocWashingWithOptions(request, runtime);
8746
+ }
8747
+
8748
+ /**
8749
+ * 内容扩写
8750
+ *
8751
+ * @param request - RunExpandContentRequest
8752
+ * @param runtime - runtime options for this request RuntimeOptions
8753
+ * @returns RunExpandContentResponse
8754
+ */
8755
+ async *runExpandContentWithSSE(request: $_model.RunExpandContentRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunExpandContentResponse, any, unknown> {
8756
+ request.validate();
8757
+ let body : {[key: string ]: any} = { };
8758
+ if (!$dara.isNull(request.content)) {
8759
+ body["Content"] = request.content;
8760
+ }
8761
+
8762
+ if (!$dara.isNull(request.prompt)) {
8763
+ body["Prompt"] = request.prompt;
8764
+ }
8765
+
8766
+ if (!$dara.isNull(request.workspaceId)) {
8767
+ body["WorkspaceId"] = request.workspaceId;
8768
+ }
8769
+
8770
+ let req = new $OpenApiUtil.OpenApiRequest({
8771
+ body: OpenApiUtil.parseToMap(body),
8772
+ });
8773
+ let params = new $OpenApiUtil.Params({
8774
+ action: "RunExpandContent",
8775
+ version: "2023-08-01",
8776
+ protocol: "HTTPS",
8777
+ pathname: "/",
8778
+ method: "POST",
8779
+ authType: "AK",
8780
+ style: "RPC",
8781
+ reqBodyType: "formData",
8782
+ bodyType: "json",
8783
+ });
8784
+ let sseResp = await this.callSSEApi(params, req, runtime);
8785
+
8786
+ for await (let resp of sseResp) {
8787
+ let data = JSON.parse(resp.event.data);
8788
+ yield $dara.cast<$_model.RunExpandContentResponse>({
8789
+ statusCode: resp.statusCode,
8790
+ headers: resp.headers,
8791
+ body: {
8792
+ ...data,
8793
+ RequestId: resp.event.id,
8794
+ Message: resp.event.event,
8795
+ },
8796
+ }, new $_model.RunExpandContentResponse({}));
8797
+ }
8798
+ }
8799
+
8800
+ /**
8801
+ * 内容扩写
8802
+ *
8803
+ * @param request - RunExpandContentRequest
8804
+ * @param runtime - runtime options for this request RuntimeOptions
8805
+ * @returns RunExpandContentResponse
8806
+ */
8807
+ async runExpandContentWithOptions(request: $_model.RunExpandContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunExpandContentResponse> {
8808
+ request.validate();
8809
+ let body : {[key: string ]: any} = { };
8810
+ if (!$dara.isNull(request.content)) {
8811
+ body["Content"] = request.content;
8812
+ }
8813
+
8814
+ if (!$dara.isNull(request.prompt)) {
8815
+ body["Prompt"] = request.prompt;
8816
+ }
8817
+
8818
+ if (!$dara.isNull(request.workspaceId)) {
8819
+ body["WorkspaceId"] = request.workspaceId;
8820
+ }
8821
+
8822
+ let req = new $OpenApiUtil.OpenApiRequest({
8823
+ body: OpenApiUtil.parseToMap(body),
8824
+ });
8825
+ let params = new $OpenApiUtil.Params({
8826
+ action: "RunExpandContent",
8827
+ version: "2023-08-01",
8828
+ protocol: "HTTPS",
8829
+ pathname: "/",
8830
+ method: "POST",
8831
+ authType: "AK",
8832
+ style: "RPC",
8833
+ reqBodyType: "formData",
8834
+ bodyType: "json",
8835
+ });
8836
+ return $dara.cast<$_model.RunExpandContentResponse>(await this.callApi(params, req, runtime), new $_model.RunExpandContentResponse({}));
8837
+ }
8838
+
8839
+ /**
8840
+ * 内容扩写
8841
+ *
8842
+ * @param request - RunExpandContentRequest
8843
+ * @returns RunExpandContentResponse
8844
+ */
8845
+ async runExpandContent(request: $_model.RunExpandContentRequest): Promise<$_model.RunExpandContentResponse> {
8846
+ let runtime = new $dara.RuntimeOptions({ });
8847
+ return await this.runExpandContentWithOptions(request, runtime);
8848
+ }
8849
+
8850
+ /**
8851
+ * 妙读猜你想问接口
8852
+ *
8853
+ * @param request - RunGenerateQuestionsRequest
8854
+ * @param runtime - runtime options for this request RuntimeOptions
8855
+ * @returns RunGenerateQuestionsResponse
8856
+ */
8857
+ async *runGenerateQuestionsWithSSE(request: $_model.RunGenerateQuestionsRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunGenerateQuestionsResponse, any, unknown> {
8858
+ request.validate();
8859
+ let body : {[key: string ]: any} = { };
8860
+ if (!$dara.isNull(request.docId)) {
8861
+ body["DocId"] = request.docId;
8862
+ }
8863
+
8864
+ if (!$dara.isNull(request.modelName)) {
8865
+ body["ModelName"] = request.modelName;
8866
+ }
8867
+
8868
+ if (!$dara.isNull(request.referenceContent)) {
8869
+ body["ReferenceContent"] = request.referenceContent;
8870
+ }
8871
+
8872
+ if (!$dara.isNull(request.sessionId)) {
8873
+ body["SessionId"] = request.sessionId;
8874
+ }
8875
+
8876
+ if (!$dara.isNull(request.workspaceId)) {
8877
+ body["WorkspaceId"] = request.workspaceId;
8878
+ }
8879
+
8880
+ let req = new $OpenApiUtil.OpenApiRequest({
8881
+ body: OpenApiUtil.parseToMap(body),
8882
+ });
8883
+ let params = new $OpenApiUtil.Params({
8884
+ action: "RunGenerateQuestions",
8885
+ version: "2023-08-01",
8886
+ protocol: "HTTPS",
8887
+ pathname: "/",
8888
+ method: "POST",
8889
+ authType: "AK",
8890
+ style: "RPC",
8891
+ reqBodyType: "formData",
8892
+ bodyType: "json",
8893
+ });
8894
+ let sseResp = await this.callSSEApi(params, req, runtime);
8895
+
8896
+ for await (let resp of sseResp) {
8897
+ let data = JSON.parse(resp.event.data);
8898
+ yield $dara.cast<$_model.RunGenerateQuestionsResponse>({
8899
+ statusCode: resp.statusCode,
8900
+ headers: resp.headers,
8901
+ body: {
8902
+ ...data,
8903
+ RequestId: resp.event.id,
8904
+ Message: resp.event.event,
8905
+ },
8906
+ }, new $_model.RunGenerateQuestionsResponse({}));
8907
+ }
8908
+ }
8909
+
8910
+ /**
8911
+ * 妙读猜你想问接口
8912
+ *
8913
+ * @param request - RunGenerateQuestionsRequest
8914
+ * @param runtime - runtime options for this request RuntimeOptions
8915
+ * @returns RunGenerateQuestionsResponse
8916
+ */
8917
+ async runGenerateQuestionsWithOptions(request: $_model.RunGenerateQuestionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunGenerateQuestionsResponse> {
8918
+ request.validate();
8919
+ let body : {[key: string ]: any} = { };
8920
+ if (!$dara.isNull(request.docId)) {
8921
+ body["DocId"] = request.docId;
8922
+ }
8923
+
8924
+ if (!$dara.isNull(request.modelName)) {
8925
+ body["ModelName"] = request.modelName;
8926
+ }
8927
+
8928
+ if (!$dara.isNull(request.referenceContent)) {
8929
+ body["ReferenceContent"] = request.referenceContent;
8930
+ }
8931
+
8932
+ if (!$dara.isNull(request.sessionId)) {
8933
+ body["SessionId"] = request.sessionId;
8934
+ }
8935
+
8936
+ if (!$dara.isNull(request.workspaceId)) {
8937
+ body["WorkspaceId"] = request.workspaceId;
8938
+ }
8939
+
8940
+ let req = new $OpenApiUtil.OpenApiRequest({
8941
+ body: OpenApiUtil.parseToMap(body),
8942
+ });
8943
+ let params = new $OpenApiUtil.Params({
8944
+ action: "RunGenerateQuestions",
8945
+ version: "2023-08-01",
8946
+ protocol: "HTTPS",
8947
+ pathname: "/",
8948
+ method: "POST",
8949
+ authType: "AK",
8950
+ style: "RPC",
8951
+ reqBodyType: "formData",
8952
+ bodyType: "json",
8953
+ });
8954
+ return $dara.cast<$_model.RunGenerateQuestionsResponse>(await this.callApi(params, req, runtime), new $_model.RunGenerateQuestionsResponse({}));
8955
+ }
8956
+
8957
+ /**
8958
+ * 妙读猜你想问接口
8959
+ *
8960
+ * @param request - RunGenerateQuestionsRequest
8961
+ * @returns RunGenerateQuestionsResponse
8962
+ */
8963
+ async runGenerateQuestions(request: $_model.RunGenerateQuestionsRequest): Promise<$_model.RunGenerateQuestionsResponse> {
8964
+ let runtime = new $dara.RuntimeOptions({ });
8965
+ return await this.runGenerateQuestionsWithOptions(request, runtime);
8966
+ }
8967
+
8968
+ /**
8969
+ * 妙读文档关键词抽取接口
8970
+ *
8971
+ * @param request - RunHotwordRequest
8972
+ * @param runtime - runtime options for this request RuntimeOptions
8973
+ * @returns RunHotwordResponse
8974
+ */
8975
+ async *runHotwordWithSSE(request: $_model.RunHotwordRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunHotwordResponse, any, unknown> {
8976
+ request.validate();
8977
+ let body : {[key: string ]: any} = { };
8978
+ if (!$dara.isNull(request.docId)) {
8979
+ body["DocId"] = request.docId;
8980
+ }
8981
+
8982
+ if (!$dara.isNull(request.modelName)) {
8983
+ body["ModelName"] = request.modelName;
8984
+ }
8985
+
8986
+ if (!$dara.isNull(request.prompt)) {
8987
+ body["Prompt"] = request.prompt;
8988
+ }
8989
+
8990
+ if (!$dara.isNull(request.referenceContent)) {
8991
+ body["ReferenceContent"] = request.referenceContent;
8992
+ }
8993
+
8994
+ if (!$dara.isNull(request.sessionId)) {
8995
+ body["SessionId"] = request.sessionId;
8996
+ }
8997
+
8998
+ if (!$dara.isNull(request.workspaceId)) {
8999
+ body["WorkspaceId"] = request.workspaceId;
9000
+ }
9001
+
9002
+ let req = new $OpenApiUtil.OpenApiRequest({
9003
+ body: OpenApiUtil.parseToMap(body),
9004
+ });
9005
+ let params = new $OpenApiUtil.Params({
9006
+ action: "RunHotword",
9007
+ version: "2023-08-01",
9008
+ protocol: "HTTPS",
9009
+ pathname: "/",
9010
+ method: "POST",
9011
+ authType: "AK",
9012
+ style: "RPC",
9013
+ reqBodyType: "formData",
9014
+ bodyType: "json",
9015
+ });
9016
+ let sseResp = await this.callSSEApi(params, req, runtime);
9017
+
9018
+ for await (let resp of sseResp) {
9019
+ let data = JSON.parse(resp.event.data);
9020
+ yield $dara.cast<$_model.RunHotwordResponse>({
9021
+ statusCode: resp.statusCode,
9022
+ headers: resp.headers,
9023
+ body: {
9024
+ ...data,
9025
+ RequestId: resp.event.id,
9026
+ Message: resp.event.event,
9027
+ },
9028
+ }, new $_model.RunHotwordResponse({}));
9029
+ }
9030
+ }
9031
+
9032
+ /**
9033
+ * 妙读文档关键词抽取接口
9034
+ *
9035
+ * @param request - RunHotwordRequest
9036
+ * @param runtime - runtime options for this request RuntimeOptions
9037
+ * @returns RunHotwordResponse
9038
+ */
9039
+ async runHotwordWithOptions(request: $_model.RunHotwordRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotwordResponse> {
9040
+ request.validate();
9041
+ let body : {[key: string ]: any} = { };
9042
+ if (!$dara.isNull(request.docId)) {
9043
+ body["DocId"] = request.docId;
9044
+ }
9045
+
9046
+ if (!$dara.isNull(request.modelName)) {
9047
+ body["ModelName"] = request.modelName;
9048
+ }
9049
+
9050
+ if (!$dara.isNull(request.prompt)) {
9051
+ body["Prompt"] = request.prompt;
9052
+ }
9053
+
9054
+ if (!$dara.isNull(request.referenceContent)) {
9055
+ body["ReferenceContent"] = request.referenceContent;
9056
+ }
9057
+
9058
+ if (!$dara.isNull(request.sessionId)) {
9059
+ body["SessionId"] = request.sessionId;
9060
+ }
9061
+
9062
+ if (!$dara.isNull(request.workspaceId)) {
9063
+ body["WorkspaceId"] = request.workspaceId;
9064
+ }
9065
+
9066
+ let req = new $OpenApiUtil.OpenApiRequest({
9067
+ body: OpenApiUtil.parseToMap(body),
9068
+ });
9069
+ let params = new $OpenApiUtil.Params({
9070
+ action: "RunHotword",
9071
+ version: "2023-08-01",
9072
+ protocol: "HTTPS",
9073
+ pathname: "/",
9074
+ method: "POST",
9075
+ authType: "AK",
9076
+ style: "RPC",
9077
+ reqBodyType: "formData",
9078
+ bodyType: "json",
9079
+ });
9080
+ return $dara.cast<$_model.RunHotwordResponse>(await this.callApi(params, req, runtime), new $_model.RunHotwordResponse({}));
9081
+ }
9082
+
9083
+ /**
9084
+ * 妙读文档关键词抽取接口
9085
+ *
9086
+ * @param request - RunHotwordRequest
9087
+ * @returns RunHotwordResponse
9088
+ */
9089
+ async runHotword(request: $_model.RunHotwordRequest): Promise<$_model.RunHotwordResponse> {
9090
+ let runtime = new $dara.RuntimeOptions({ });
9091
+ return await this.runHotwordWithOptions(request, runtime);
9092
+ }
9093
+
9094
+ /**
9095
+ * AI妙笔-创作-抽取关键词
9096
+ *
9097
+ * @param tmpReq - RunKeywordsExtractionGenerationRequest
9098
+ * @param runtime - runtime options for this request RuntimeOptions
9099
+ * @returns RunKeywordsExtractionGenerationResponse
9100
+ */
9101
+ async *runKeywordsExtractionGenerationWithSSE(tmpReq: $_model.RunKeywordsExtractionGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunKeywordsExtractionGenerationResponse, any, unknown> {
9102
+ tmpReq.validate();
9103
+ let request = new $_model.RunKeywordsExtractionGenerationShrinkRequest({ });
9104
+ OpenApiUtil.convert(tmpReq, request);
9105
+ if (!$dara.isNull(tmpReq.referenceData)) {
9106
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
9107
+ }
9108
+
9109
+ let body : {[key: string ]: any} = { };
9110
+ if (!$dara.isNull(request.prompt)) {
9111
+ body["Prompt"] = request.prompt;
9112
+ }
9113
+
9114
+ if (!$dara.isNull(request.referenceDataShrink)) {
9115
+ body["ReferenceData"] = request.referenceDataShrink;
9116
+ }
9117
+
9118
+ if (!$dara.isNull(request.taskId)) {
9119
+ body["TaskId"] = request.taskId;
9120
+ }
9121
+
9122
+ if (!$dara.isNull(request.workspaceId)) {
9123
+ body["WorkspaceId"] = request.workspaceId;
9124
+ }
9125
+
9126
+ let req = new $OpenApiUtil.OpenApiRequest({
9127
+ body: OpenApiUtil.parseToMap(body),
9128
+ });
9129
+ let params = new $OpenApiUtil.Params({
9130
+ action: "RunKeywordsExtractionGeneration",
9131
+ version: "2023-08-01",
9132
+ protocol: "HTTPS",
9133
+ pathname: "/",
9134
+ method: "POST",
9135
+ authType: "AK",
9136
+ style: "RPC",
9137
+ reqBodyType: "formData",
9138
+ bodyType: "json",
9139
+ });
9140
+ let sseResp = await this.callSSEApi(params, req, runtime);
9141
+
9142
+ for await (let resp of sseResp) {
9143
+ let data = JSON.parse(resp.event.data);
9144
+ yield $dara.cast<$_model.RunKeywordsExtractionGenerationResponse>({
9145
+ statusCode: resp.statusCode,
9146
+ headers: resp.headers,
9147
+ body: {
9148
+ ...data,
9149
+ RequestId: resp.event.id,
9150
+ Message: resp.event.event,
9151
+ },
9152
+ }, new $_model.RunKeywordsExtractionGenerationResponse({}));
9153
+ }
9154
+ }
9155
+
9156
+ /**
9157
+ * AI妙笔-创作-抽取关键词
9158
+ *
9159
+ * @param tmpReq - RunKeywordsExtractionGenerationRequest
9160
+ * @param runtime - runtime options for this request RuntimeOptions
9161
+ * @returns RunKeywordsExtractionGenerationResponse
9162
+ */
9163
+ async runKeywordsExtractionGenerationWithOptions(tmpReq: $_model.RunKeywordsExtractionGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
9164
+ tmpReq.validate();
9165
+ let request = new $_model.RunKeywordsExtractionGenerationShrinkRequest({ });
9166
+ OpenApiUtil.convert(tmpReq, request);
9167
+ if (!$dara.isNull(tmpReq.referenceData)) {
9168
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
9169
+ }
9170
+
9171
+ let body : {[key: string ]: any} = { };
9172
+ if (!$dara.isNull(request.prompt)) {
9173
+ body["Prompt"] = request.prompt;
9174
+ }
9175
+
9176
+ if (!$dara.isNull(request.referenceDataShrink)) {
9177
+ body["ReferenceData"] = request.referenceDataShrink;
9178
+ }
9179
+
9180
+ if (!$dara.isNull(request.taskId)) {
9181
+ body["TaskId"] = request.taskId;
9182
+ }
9183
+
9184
+ if (!$dara.isNull(request.workspaceId)) {
9185
+ body["WorkspaceId"] = request.workspaceId;
9186
+ }
9187
+
9188
+ let req = new $OpenApiUtil.OpenApiRequest({
9189
+ body: OpenApiUtil.parseToMap(body),
9190
+ });
9191
+ let params = new $OpenApiUtil.Params({
9192
+ action: "RunKeywordsExtractionGeneration",
9193
+ version: "2023-08-01",
9194
+ protocol: "HTTPS",
9195
+ pathname: "/",
9196
+ method: "POST",
9197
+ authType: "AK",
9198
+ style: "RPC",
9199
+ reqBodyType: "formData",
9200
+ bodyType: "json",
9201
+ });
9202
+ return $dara.cast<$_model.RunKeywordsExtractionGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunKeywordsExtractionGenerationResponse({}));
9203
+ }
9204
+
9205
+ /**
9206
+ * AI妙笔-创作-抽取关键词
9207
+ *
9208
+ * @param request - RunKeywordsExtractionGenerationRequest
9209
+ * @returns RunKeywordsExtractionGenerationResponse
9210
+ */
9211
+ async runKeywordsExtractionGeneration(request: $_model.RunKeywordsExtractionGenerationRequest): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
9212
+ let runtime = new $dara.RuntimeOptions({ });
9213
+ return await this.runKeywordsExtractionGenerationWithOptions(request, runtime);
9214
+ }
9215
+
9216
+ /**
9217
+ * 文档批量导读
9218
+ *
9219
+ * @param tmpReq - RunMultiDocIntroductionRequest
9220
+ * @param runtime - runtime options for this request RuntimeOptions
9221
+ * @returns RunMultiDocIntroductionResponse
9222
+ */
9223
+ async *runMultiDocIntroductionWithSSE(tmpReq: $_model.RunMultiDocIntroductionRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunMultiDocIntroductionResponse, any, unknown> {
9224
+ tmpReq.validate();
9225
+ let request = new $_model.RunMultiDocIntroductionShrinkRequest({ });
9226
+ OpenApiUtil.convert(tmpReq, request);
9227
+ if (!$dara.isNull(tmpReq.docIds)) {
9228
+ request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
9229
+ }
9230
+
9231
+ let body : {[key: string ]: any} = { };
9232
+ if (!$dara.isNull(request.docIdsShrink)) {
9233
+ body["DocIds"] = request.docIdsShrink;
9234
+ }
9235
+
9236
+ if (!$dara.isNull(request.keyPointPrompt)) {
9237
+ body["KeyPointPrompt"] = request.keyPointPrompt;
9238
+ }
9239
+
9240
+ if (!$dara.isNull(request.modelName)) {
9241
+ body["ModelName"] = request.modelName;
9242
+ }
9243
+
9244
+ if (!$dara.isNull(request.sessionId)) {
9245
+ body["SessionId"] = request.sessionId;
9246
+ }
9247
+
9248
+ if (!$dara.isNull(request.summaryPrompt)) {
9249
+ body["SummaryPrompt"] = request.summaryPrompt;
9250
+ }
9251
+
9252
+ if (!$dara.isNull(request.workspaceId)) {
9253
+ body["WorkspaceId"] = request.workspaceId;
9254
+ }
9255
+
9256
+ let req = new $OpenApiUtil.OpenApiRequest({
9257
+ body: OpenApiUtil.parseToMap(body),
9258
+ });
9259
+ let params = new $OpenApiUtil.Params({
9260
+ action: "RunMultiDocIntroduction",
9261
+ version: "2023-08-01",
9262
+ protocol: "HTTPS",
9263
+ pathname: "/",
9264
+ method: "POST",
9265
+ authType: "AK",
9266
+ style: "RPC",
9267
+ reqBodyType: "formData",
9268
+ bodyType: "json",
9269
+ });
9270
+ let sseResp = await this.callSSEApi(params, req, runtime);
9271
+
9272
+ for await (let resp of sseResp) {
9273
+ let data = JSON.parse(resp.event.data);
9274
+ yield $dara.cast<$_model.RunMultiDocIntroductionResponse>({
9275
+ statusCode: resp.statusCode,
9276
+ headers: resp.headers,
9277
+ body: {
9278
+ ...data,
9279
+ RequestId: resp.event.id,
9280
+ Message: resp.event.event,
9281
+ },
9282
+ }, new $_model.RunMultiDocIntroductionResponse({}));
9283
+ }
9284
+ }
9285
+
9286
+ /**
9287
+ * 文档批量导读
9288
+ *
9289
+ * @param tmpReq - RunMultiDocIntroductionRequest
9290
+ * @param runtime - runtime options for this request RuntimeOptions
9291
+ * @returns RunMultiDocIntroductionResponse
9292
+ */
9293
+ async runMultiDocIntroductionWithOptions(tmpReq: $_model.RunMultiDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunMultiDocIntroductionResponse> {
9294
+ tmpReq.validate();
9295
+ let request = new $_model.RunMultiDocIntroductionShrinkRequest({ });
9296
+ OpenApiUtil.convert(tmpReq, request);
9297
+ if (!$dara.isNull(tmpReq.docIds)) {
9298
+ request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
9299
+ }
9300
+
9301
+ let body : {[key: string ]: any} = { };
9302
+ if (!$dara.isNull(request.docIdsShrink)) {
9303
+ body["DocIds"] = request.docIdsShrink;
9304
+ }
9305
+
9306
+ if (!$dara.isNull(request.keyPointPrompt)) {
9307
+ body["KeyPointPrompt"] = request.keyPointPrompt;
9308
+ }
9309
+
9310
+ if (!$dara.isNull(request.modelName)) {
9311
+ body["ModelName"] = request.modelName;
9312
+ }
9313
+
9314
+ if (!$dara.isNull(request.sessionId)) {
9315
+ body["SessionId"] = request.sessionId;
9316
+ }
9317
+
9318
+ if (!$dara.isNull(request.summaryPrompt)) {
9319
+ body["SummaryPrompt"] = request.summaryPrompt;
9320
+ }
9321
+
9322
+ if (!$dara.isNull(request.workspaceId)) {
9323
+ body["WorkspaceId"] = request.workspaceId;
9324
+ }
9325
+
9326
+ let req = new $OpenApiUtil.OpenApiRequest({
9327
+ body: OpenApiUtil.parseToMap(body),
9328
+ });
9329
+ let params = new $OpenApiUtil.Params({
9330
+ action: "RunMultiDocIntroduction",
9331
+ version: "2023-08-01",
9332
+ protocol: "HTTPS",
9333
+ pathname: "/",
9334
+ method: "POST",
9335
+ authType: "AK",
9336
+ style: "RPC",
9337
+ reqBodyType: "formData",
9338
+ bodyType: "json",
9339
+ });
9340
+ return $dara.cast<$_model.RunMultiDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunMultiDocIntroductionResponse({}));
9341
+ }
9342
+
9343
+ /**
9344
+ * 文档批量导读
9345
+ *
9346
+ * @param request - RunMultiDocIntroductionRequest
9347
+ * @returns RunMultiDocIntroductionResponse
9348
+ */
9349
+ async runMultiDocIntroduction(request: $_model.RunMultiDocIntroductionRequest): Promise<$_model.RunMultiDocIntroductionResponse> {
9350
+ let runtime = new $dara.RuntimeOptions({ });
9351
+ return await this.runMultiDocIntroductionWithOptions(request, runtime);
9352
+ }
9353
+
9354
+ /**
9355
+ * AI妙搜-智能搜索生成
9356
+ *
9357
+ * @param tmpReq - RunSearchGenerationRequest
9358
+ * @param runtime - runtime options for this request RuntimeOptions
9359
+ * @returns RunSearchGenerationResponse
9360
+ */
9361
+ async *runSearchGenerationWithSSE(tmpReq: $_model.RunSearchGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSearchGenerationResponse, any, unknown> {
9362
+ tmpReq.validate();
9363
+ let request = new $_model.RunSearchGenerationShrinkRequest({ });
9364
+ OpenApiUtil.convert(tmpReq, request);
9365
+ if (!$dara.isNull(tmpReq.agentContext)) {
9366
+ request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
9367
+ }
9368
+
9369
+ if (!$dara.isNull(tmpReq.chatConfig)) {
9370
+ request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
9371
+ }
9372
+
9373
+ let body : {[key: string ]: any} = { };
9374
+ if (!$dara.isNull(request.agentContextShrink)) {
9375
+ body["AgentContext"] = request.agentContextShrink;
9376
+ }
9377
+
9378
+ if (!$dara.isNull(request.chatConfigShrink)) {
9379
+ body["ChatConfig"] = request.chatConfigShrink;
9380
+ }
9381
+
9382
+ if (!$dara.isNull(request.modelId)) {
9383
+ body["ModelId"] = request.modelId;
9384
+ }
9385
+
9386
+ if (!$dara.isNull(request.originalSessionId)) {
9387
+ body["OriginalSessionId"] = request.originalSessionId;
9388
+ }
9389
+
9390
+ if (!$dara.isNull(request.prompt)) {
9391
+ body["Prompt"] = request.prompt;
9392
+ }
9393
+
9394
+ if (!$dara.isNull(request.taskId)) {
9395
+ body["TaskId"] = request.taskId;
9396
+ }
9397
+
9398
+ if (!$dara.isNull(request.workspaceId)) {
9399
+ body["WorkspaceId"] = request.workspaceId;
9400
+ }
9401
+
9402
+ let req = new $OpenApiUtil.OpenApiRequest({
9403
+ body: OpenApiUtil.parseToMap(body),
9404
+ });
9405
+ let params = new $OpenApiUtil.Params({
9406
+ action: "RunSearchGeneration",
9407
+ version: "2023-08-01",
9408
+ protocol: "HTTPS",
9409
+ pathname: "/",
9410
+ method: "POST",
9411
+ authType: "AK",
9412
+ style: "RPC",
9413
+ reqBodyType: "formData",
9414
+ bodyType: "json",
9415
+ });
9416
+ let sseResp = await this.callSSEApi(params, req, runtime);
9417
+
9418
+ for await (let resp of sseResp) {
9419
+ let data = JSON.parse(resp.event.data);
9420
+ yield $dara.cast<$_model.RunSearchGenerationResponse>({
9421
+ statusCode: resp.statusCode,
9422
+ headers: resp.headers,
9423
+ body: {
9424
+ ...data,
9425
+ RequestId: resp.event.id,
9426
+ Message: resp.event.event,
9427
+ },
9428
+ }, new $_model.RunSearchGenerationResponse({}));
9429
+ }
9430
+ }
9431
+
9432
+ /**
9433
+ * AI妙搜-智能搜索生成
9434
+ *
9435
+ * @param tmpReq - RunSearchGenerationRequest
9436
+ * @param runtime - runtime options for this request RuntimeOptions
9437
+ * @returns RunSearchGenerationResponse
9438
+ */
9439
+ async runSearchGenerationWithOptions(tmpReq: $_model.RunSearchGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchGenerationResponse> {
9440
+ tmpReq.validate();
9441
+ let request = new $_model.RunSearchGenerationShrinkRequest({ });
9442
+ OpenApiUtil.convert(tmpReq, request);
9443
+ if (!$dara.isNull(tmpReq.agentContext)) {
9444
+ request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
9445
+ }
9446
+
9447
+ if (!$dara.isNull(tmpReq.chatConfig)) {
9448
+ request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
9449
+ }
9450
+
9451
+ let body : {[key: string ]: any} = { };
9452
+ if (!$dara.isNull(request.agentContextShrink)) {
9453
+ body["AgentContext"] = request.agentContextShrink;
9454
+ }
9455
+
9456
+ if (!$dara.isNull(request.chatConfigShrink)) {
9457
+ body["ChatConfig"] = request.chatConfigShrink;
9458
+ }
9459
+
9460
+ if (!$dara.isNull(request.modelId)) {
9461
+ body["ModelId"] = request.modelId;
9462
+ }
9463
+
9464
+ if (!$dara.isNull(request.originalSessionId)) {
9465
+ body["OriginalSessionId"] = request.originalSessionId;
9466
+ }
9467
+
9468
+ if (!$dara.isNull(request.prompt)) {
9469
+ body["Prompt"] = request.prompt;
9470
+ }
9471
+
9472
+ if (!$dara.isNull(request.taskId)) {
9473
+ body["TaskId"] = request.taskId;
9474
+ }
9475
+
9476
+ if (!$dara.isNull(request.workspaceId)) {
9477
+ body["WorkspaceId"] = request.workspaceId;
9478
+ }
9479
+
9480
+ let req = new $OpenApiUtil.OpenApiRequest({
9481
+ body: OpenApiUtil.parseToMap(body),
9482
+ });
9483
+ let params = new $OpenApiUtil.Params({
9484
+ action: "RunSearchGeneration",
9485
+ version: "2023-08-01",
9486
+ protocol: "HTTPS",
9487
+ pathname: "/",
9488
+ method: "POST",
9489
+ authType: "AK",
9490
+ style: "RPC",
9491
+ reqBodyType: "formData",
9492
+ bodyType: "json",
9493
+ });
9494
+ return $dara.cast<$_model.RunSearchGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchGenerationResponse({}));
9495
+ }
9496
+
9497
+ /**
9498
+ * AI妙搜-智能搜索生成
9499
+ *
9500
+ * @param request - RunSearchGenerationRequest
9501
+ * @returns RunSearchGenerationResponse
9502
+ */
9503
+ async runSearchGeneration(request: $_model.RunSearchGenerationRequest): Promise<$_model.RunSearchGenerationResponse> {
9504
+ let runtime = new $dara.RuntimeOptions({ });
9505
+ return await this.runSearchGenerationWithOptions(request, runtime);
9506
+ }
9507
+
9508
+ /**
9509
+ * 妙搜-文搜文
9510
+ *
9511
+ * @param tmpReq - RunSearchSimilarArticlesRequest
9512
+ * @param runtime - runtime options for this request RuntimeOptions
9513
+ * @returns RunSearchSimilarArticlesResponse
9514
+ */
9515
+ async *runSearchSimilarArticlesWithSSE(tmpReq: $_model.RunSearchSimilarArticlesRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSearchSimilarArticlesResponse, any, unknown> {
9516
+ tmpReq.validate();
9517
+ let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
9518
+ OpenApiUtil.convert(tmpReq, request);
9519
+ if (!$dara.isNull(tmpReq.chatConfig)) {
9520
+ request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
9521
+ }
9522
+
9523
+ let body : {[key: string ]: any} = { };
9524
+ if (!$dara.isNull(request.chatConfigShrink)) {
9525
+ body["ChatConfig"] = request.chatConfigShrink;
9526
+ }
9527
+
9528
+ if (!$dara.isNull(request.docType)) {
9529
+ body["DocType"] = request.docType;
9530
+ }
9531
+
9532
+ if (!$dara.isNull(request.title)) {
9533
+ body["Title"] = request.title;
9534
+ }
9535
+
9536
+ if (!$dara.isNull(request.url)) {
9537
+ body["Url"] = request.url;
9538
+ }
9539
+
9540
+ if (!$dara.isNull(request.workspaceId)) {
9541
+ body["WorkspaceId"] = request.workspaceId;
9542
+ }
9543
+
9544
+ let req = new $OpenApiUtil.OpenApiRequest({
9545
+ body: OpenApiUtil.parseToMap(body),
9546
+ });
9547
+ let params = new $OpenApiUtil.Params({
9548
+ action: "RunSearchSimilarArticles",
9549
+ version: "2023-08-01",
9550
+ protocol: "HTTPS",
9551
+ pathname: "/",
9552
+ method: "POST",
9553
+ authType: "AK",
9554
+ style: "RPC",
9555
+ reqBodyType: "formData",
9556
+ bodyType: "json",
9557
+ });
9558
+ let sseResp = await this.callSSEApi(params, req, runtime);
9559
+
9560
+ for await (let resp of sseResp) {
9561
+ let data = JSON.parse(resp.event.data);
9562
+ yield $dara.cast<$_model.RunSearchSimilarArticlesResponse>({
9563
+ statusCode: resp.statusCode,
9564
+ headers: resp.headers,
9565
+ body: {
9566
+ ...data,
9567
+ RequestId: resp.event.id,
9568
+ Message: resp.event.event,
9569
+ },
9570
+ }, new $_model.RunSearchSimilarArticlesResponse({}));
9571
+ }
9572
+ }
9573
+
9574
+ /**
9575
+ * 妙搜-文搜文
9576
+ *
9577
+ * @param tmpReq - RunSearchSimilarArticlesRequest
9578
+ * @param runtime - runtime options for this request RuntimeOptions
9579
+ * @returns RunSearchSimilarArticlesResponse
9580
+ */
9581
+ async runSearchSimilarArticlesWithOptions(tmpReq: $_model.RunSearchSimilarArticlesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchSimilarArticlesResponse> {
9582
+ tmpReq.validate();
9583
+ let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
9584
+ OpenApiUtil.convert(tmpReq, request);
9585
+ if (!$dara.isNull(tmpReq.chatConfig)) {
9586
+ request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
9587
+ }
9588
+
9589
+ let body : {[key: string ]: any} = { };
9590
+ if (!$dara.isNull(request.chatConfigShrink)) {
9591
+ body["ChatConfig"] = request.chatConfigShrink;
9592
+ }
9593
+
9594
+ if (!$dara.isNull(request.docType)) {
9595
+ body["DocType"] = request.docType;
9596
+ }
9597
+
9598
+ if (!$dara.isNull(request.title)) {
9599
+ body["Title"] = request.title;
9600
+ }
9601
+
9602
+ if (!$dara.isNull(request.url)) {
9603
+ body["Url"] = request.url;
9604
+ }
9605
+
9606
+ if (!$dara.isNull(request.workspaceId)) {
9607
+ body["WorkspaceId"] = request.workspaceId;
9608
+ }
9609
+
9610
+ let req = new $OpenApiUtil.OpenApiRequest({
9611
+ body: OpenApiUtil.parseToMap(body),
9612
+ });
9613
+ let params = new $OpenApiUtil.Params({
9614
+ action: "RunSearchSimilarArticles",
9615
+ version: "2023-08-01",
9616
+ protocol: "HTTPS",
9617
+ pathname: "/",
9618
+ method: "POST",
9619
+ authType: "AK",
9620
+ style: "RPC",
9621
+ reqBodyType: "formData",
9622
+ bodyType: "json",
9623
+ });
9624
+ return $dara.cast<$_model.RunSearchSimilarArticlesResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchSimilarArticlesResponse({}));
9625
+ }
9626
+
9627
+ /**
9628
+ * 妙搜-文搜文
9629
+ *
9630
+ * @param request - RunSearchSimilarArticlesRequest
9631
+ * @returns RunSearchSimilarArticlesResponse
9632
+ */
9633
+ async runSearchSimilarArticles(request: $_model.RunSearchSimilarArticlesRequest): Promise<$_model.RunSearchSimilarArticlesResponse> {
9634
+ let runtime = new $dara.RuntimeOptions({ });
9635
+ return await this.runSearchSimilarArticlesWithOptions(request, runtime);
9636
+ }
9637
+
9638
+ /**
9639
+ * 创作-分步骤写作
9640
+ *
9641
+ * @param tmpReq - RunStepByStepWritingRequest
9642
+ * @param runtime - runtime options for this request RuntimeOptions
9643
+ * @returns RunStepByStepWritingResponse
9644
+ */
9645
+ async *runStepByStepWritingWithSSE(tmpReq: $_model.RunStepByStepWritingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunStepByStepWritingResponse, any, unknown> {
9646
+ tmpReq.validate();
9647
+ let request = new $_model.RunStepByStepWritingShrinkRequest({ });
9648
+ OpenApiUtil.convert(tmpReq, request);
9649
+ if (!$dara.isNull(tmpReq.referenceData)) {
9650
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
9651
+ }
9652
+
9653
+ if (!$dara.isNull(tmpReq.writingConfig)) {
9654
+ request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
9655
+ }
9656
+
9657
+ let body : {[key: string ]: any} = { };
9658
+ if (!$dara.isNull(request.originSessionId)) {
9659
+ body["OriginSessionId"] = request.originSessionId;
9660
+ }
9661
+
9662
+ if (!$dara.isNull(request.prompt)) {
9663
+ body["Prompt"] = request.prompt;
9664
+ }
9665
+
9666
+ if (!$dara.isNull(request.referenceDataShrink)) {
9667
+ body["ReferenceData"] = request.referenceDataShrink;
9668
+ }
9669
+
9670
+ if (!$dara.isNull(request.sessionId)) {
9671
+ body["SessionId"] = request.sessionId;
9672
+ }
9673
+
9674
+ if (!$dara.isNull(request.taskId)) {
9675
+ body["TaskId"] = request.taskId;
9676
+ }
9677
+
9678
+ if (!$dara.isNull(request.workspaceId)) {
9679
+ body["WorkspaceId"] = request.workspaceId;
9680
+ }
9681
+
9682
+ if (!$dara.isNull(request.writingConfigShrink)) {
9683
+ body["WritingConfig"] = request.writingConfigShrink;
9684
+ }
9685
+
9686
+ let req = new $OpenApiUtil.OpenApiRequest({
9687
+ body: OpenApiUtil.parseToMap(body),
9688
+ });
9689
+ let params = new $OpenApiUtil.Params({
9690
+ action: "RunStepByStepWriting",
9691
+ version: "2023-08-01",
9692
+ protocol: "HTTPS",
9693
+ pathname: "/",
9694
+ method: "POST",
9695
+ authType: "AK",
9696
+ style: "RPC",
9697
+ reqBodyType: "formData",
9698
+ bodyType: "json",
9699
+ });
9700
+ let sseResp = await this.callSSEApi(params, req, runtime);
9701
+
9702
+ for await (let resp of sseResp) {
9703
+ let data = JSON.parse(resp.event.data);
9704
+ yield $dara.cast<$_model.RunStepByStepWritingResponse>({
9705
+ statusCode: resp.statusCode,
9706
+ headers: resp.headers,
9707
+ body: {
9708
+ ...data,
9709
+ RequestId: resp.event.id,
9710
+ Message: resp.event.event,
9711
+ },
9712
+ }, new $_model.RunStepByStepWritingResponse({}));
9713
+ }
9714
+ }
9715
+
9716
+ /**
9717
+ * 创作-分步骤写作
9718
+ *
9719
+ * @param tmpReq - RunStepByStepWritingRequest
9720
+ * @param runtime - runtime options for this request RuntimeOptions
9721
+ * @returns RunStepByStepWritingResponse
9722
+ */
9723
+ async runStepByStepWritingWithOptions(tmpReq: $_model.RunStepByStepWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStepByStepWritingResponse> {
9724
+ tmpReq.validate();
9725
+ let request = new $_model.RunStepByStepWritingShrinkRequest({ });
9726
+ OpenApiUtil.convert(tmpReq, request);
9727
+ if (!$dara.isNull(tmpReq.referenceData)) {
9728
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
9729
+ }
9730
+
9731
+ if (!$dara.isNull(tmpReq.writingConfig)) {
9732
+ request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
9733
+ }
9734
+
9735
+ let body : {[key: string ]: any} = { };
9736
+ if (!$dara.isNull(request.originSessionId)) {
9737
+ body["OriginSessionId"] = request.originSessionId;
9738
+ }
9739
+
9740
+ if (!$dara.isNull(request.prompt)) {
9741
+ body["Prompt"] = request.prompt;
9742
+ }
9743
+
9744
+ if (!$dara.isNull(request.referenceDataShrink)) {
9745
+ body["ReferenceData"] = request.referenceDataShrink;
9746
+ }
9747
+
9748
+ if (!$dara.isNull(request.sessionId)) {
9749
+ body["SessionId"] = request.sessionId;
9750
+ }
9751
+
9752
+ if (!$dara.isNull(request.taskId)) {
9753
+ body["TaskId"] = request.taskId;
9754
+ }
9755
+
9756
+ if (!$dara.isNull(request.workspaceId)) {
9757
+ body["WorkspaceId"] = request.workspaceId;
9758
+ }
9759
+
9760
+ if (!$dara.isNull(request.writingConfigShrink)) {
9761
+ body["WritingConfig"] = request.writingConfigShrink;
9762
+ }
9763
+
9764
+ let req = new $OpenApiUtil.OpenApiRequest({
9765
+ body: OpenApiUtil.parseToMap(body),
9766
+ });
9767
+ let params = new $OpenApiUtil.Params({
9768
+ action: "RunStepByStepWriting",
9769
+ version: "2023-08-01",
9770
+ protocol: "HTTPS",
9771
+ pathname: "/",
9772
+ method: "POST",
9773
+ authType: "AK",
9774
+ style: "RPC",
9775
+ reqBodyType: "formData",
9776
+ bodyType: "json",
9777
+ });
9778
+ return $dara.cast<$_model.RunStepByStepWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunStepByStepWritingResponse({}));
9779
+ }
9780
+
9781
+ /**
9782
+ * 创作-分步骤写作
9783
+ *
9784
+ * @param request - RunStepByStepWritingRequest
9785
+ * @returns RunStepByStepWritingResponse
9786
+ */
9787
+ async runStepByStepWriting(request: $_model.RunStepByStepWritingRequest): Promise<$_model.RunStepByStepWritingResponse> {
9788
+ let runtime = new $dara.RuntimeOptions({ });
9789
+ return await this.runStepByStepWritingWithOptions(request, runtime);
9790
+ }
9791
+
9792
+ /**
9793
+ * 内容特点分析
9794
+ *
9795
+ * @param tmpReq - RunStyleFeatureAnalysisRequest
9796
+ * @param runtime - runtime options for this request RuntimeOptions
9797
+ * @returns RunStyleFeatureAnalysisResponse
9798
+ */
9799
+ async *runStyleFeatureAnalysisWithSSE(tmpReq: $_model.RunStyleFeatureAnalysisRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunStyleFeatureAnalysisResponse, any, unknown> {
9800
+ tmpReq.validate();
9801
+ let request = new $_model.RunStyleFeatureAnalysisShrinkRequest({ });
9802
+ OpenApiUtil.convert(tmpReq, request);
9803
+ if (!$dara.isNull(tmpReq.contents)) {
9804
+ request.contentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contents, "Contents", "json");
9805
+ }
9806
+
9807
+ if (!$dara.isNull(tmpReq.materialIds)) {
9808
+ request.materialIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.materialIds, "MaterialIds", "json");
9809
+ }
9810
+
9811
+ let body : {[key: string ]: any} = { };
9812
+ if (!$dara.isNull(request.contentsShrink)) {
9813
+ body["Contents"] = request.contentsShrink;
9814
+ }
9815
+
9816
+ if (!$dara.isNull(request.materialIdsShrink)) {
9817
+ body["MaterialIds"] = request.materialIdsShrink;
9818
+ }
9819
+
9820
+ if (!$dara.isNull(request.workspaceId)) {
9821
+ body["WorkspaceId"] = request.workspaceId;
9822
+ }
9823
+
9824
+ let req = new $OpenApiUtil.OpenApiRequest({
9825
+ body: OpenApiUtil.parseToMap(body),
9826
+ });
9827
+ let params = new $OpenApiUtil.Params({
9828
+ action: "RunStyleFeatureAnalysis",
9829
+ version: "2023-08-01",
9830
+ protocol: "HTTPS",
9831
+ pathname: "/",
9832
+ method: "POST",
9833
+ authType: "AK",
9834
+ style: "RPC",
9835
+ reqBodyType: "formData",
9836
+ bodyType: "json",
9837
+ });
9838
+ let sseResp = await this.callSSEApi(params, req, runtime);
9839
+
9840
+ for await (let resp of sseResp) {
9841
+ let data = JSON.parse(resp.event.data);
9842
+ yield $dara.cast<$_model.RunStyleFeatureAnalysisResponse>({
9843
+ statusCode: resp.statusCode,
9844
+ headers: resp.headers,
9845
+ body: {
9846
+ ...data,
9847
+ RequestId: resp.event.id,
9848
+ Message: resp.event.event,
9849
+ },
9850
+ }, new $_model.RunStyleFeatureAnalysisResponse({}));
9851
+ }
9852
+ }
9853
+
9854
+ /**
9855
+ * 内容特点分析
9856
+ *
9857
+ * @param tmpReq - RunStyleFeatureAnalysisRequest
9858
+ * @param runtime - runtime options for this request RuntimeOptions
9859
+ * @returns RunStyleFeatureAnalysisResponse
9860
+ */
9861
+ async runStyleFeatureAnalysisWithOptions(tmpReq: $_model.RunStyleFeatureAnalysisRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStyleFeatureAnalysisResponse> {
9862
+ tmpReq.validate();
9863
+ let request = new $_model.RunStyleFeatureAnalysisShrinkRequest({ });
9864
+ OpenApiUtil.convert(tmpReq, request);
9865
+ if (!$dara.isNull(tmpReq.contents)) {
9866
+ request.contentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contents, "Contents", "json");
7310
9867
  }
7311
9868
 
7312
- if (!$dara.isNull(request.wordNumber)) {
7313
- body["WordNumber"] = request.wordNumber;
9869
+ if (!$dara.isNull(tmpReq.materialIds)) {
9870
+ request.materialIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.materialIds, "MaterialIds", "json");
7314
9871
  }
7315
9872
 
7316
- if (!$dara.isNull(request.workspaceId)) {
7317
- body["WorkspaceId"] = request.workspaceId;
9873
+ let body : {[key: string ]: any} = { };
9874
+ if (!$dara.isNull(request.contentsShrink)) {
9875
+ body["Contents"] = request.contentsShrink;
7318
9876
  }
7319
9877
 
7320
- if (!$dara.isNull(request.writingTypeName)) {
7321
- body["WritingTypeName"] = request.writingTypeName;
9878
+ if (!$dara.isNull(request.materialIdsShrink)) {
9879
+ body["MaterialIds"] = request.materialIdsShrink;
7322
9880
  }
7323
9881
 
7324
- if (!$dara.isNull(request.writingTypeRefDoc)) {
7325
- body["WritingTypeRefDoc"] = request.writingTypeRefDoc;
9882
+ if (!$dara.isNull(request.workspaceId)) {
9883
+ body["WorkspaceId"] = request.workspaceId;
7326
9884
  }
7327
9885
 
7328
9886
  let req = new $OpenApiUtil.OpenApiRequest({
7329
9887
  body: OpenApiUtil.parseToMap(body),
7330
9888
  });
7331
9889
  let params = new $OpenApiUtil.Params({
7332
- action: "RunDocWashing",
9890
+ action: "RunStyleFeatureAnalysis",
7333
9891
  version: "2023-08-01",
7334
9892
  protocol: "HTTPS",
7335
9893
  pathname: "/",
@@ -7339,28 +9897,28 @@ export default class Client extends OpenApi {
7339
9897
  reqBodyType: "formData",
7340
9898
  bodyType: "json",
7341
9899
  });
7342
- return $dara.cast<$_model.RunDocWashingResponse>(await this.callApi(params, req, runtime), new $_model.RunDocWashingResponse({}));
9900
+ return $dara.cast<$_model.RunStyleFeatureAnalysisResponse>(await this.callApi(params, req, runtime), new $_model.RunStyleFeatureAnalysisResponse({}));
7343
9901
  }
7344
9902
 
7345
9903
  /**
7346
- * 文档改写
9904
+ * 内容特点分析
7347
9905
  *
7348
- * @param request - RunDocWashingRequest
7349
- * @returns RunDocWashingResponse
9906
+ * @param request - RunStyleFeatureAnalysisRequest
9907
+ * @returns RunStyleFeatureAnalysisResponse
7350
9908
  */
7351
- async runDocWashing(request: $_model.RunDocWashingRequest): Promise<$_model.RunDocWashingResponse> {
9909
+ async runStyleFeatureAnalysis(request: $_model.RunStyleFeatureAnalysisRequest): Promise<$_model.RunStyleFeatureAnalysisResponse> {
7352
9910
  let runtime = new $dara.RuntimeOptions({ });
7353
- return await this.runDocWashingWithOptions(request, runtime);
9911
+ return await this.runStyleFeatureAnalysisWithOptions(request, runtime);
7354
9912
  }
7355
9913
 
7356
9914
  /**
7357
- * 内容扩写
9915
+ * 内容摘要生成
7358
9916
  *
7359
- * @param request - RunExpandContentRequest
9917
+ * @param request - RunSummaryGenerateRequest
7360
9918
  * @param runtime - runtime options for this request RuntimeOptions
7361
- * @returns RunExpandContentResponse
9919
+ * @returns RunSummaryGenerateResponse
7362
9920
  */
7363
- async runExpandContentWithOptions(request: $_model.RunExpandContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunExpandContentResponse> {
9921
+ async *runSummaryGenerateWithSSE(request: $_model.RunSummaryGenerateRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunSummaryGenerateResponse, any, unknown> {
7364
9922
  request.validate();
7365
9923
  let body : {[key: string ]: any} = { };
7366
9924
  if (!$dara.isNull(request.content)) {
@@ -7379,7 +9937,7 @@ export default class Client extends OpenApi {
7379
9937
  body: OpenApiUtil.parseToMap(body),
7380
9938
  });
7381
9939
  let params = new $OpenApiUtil.Params({
7382
- action: "RunExpandContent",
9940
+ action: "RunSummaryGenerate",
7383
9941
  version: "2023-08-01",
7384
9942
  protocol: "HTTPS",
7385
9943
  pathname: "/",
@@ -7389,44 +9947,38 @@ export default class Client extends OpenApi {
7389
9947
  reqBodyType: "formData",
7390
9948
  bodyType: "json",
7391
9949
  });
7392
- return $dara.cast<$_model.RunExpandContentResponse>(await this.callApi(params, req, runtime), new $_model.RunExpandContentResponse({}));
7393
- }
9950
+ let sseResp = await this.callSSEApi(params, req, runtime);
7394
9951
 
7395
- /**
7396
- * 内容扩写
7397
- *
7398
- * @param request - RunExpandContentRequest
7399
- * @returns RunExpandContentResponse
7400
- */
7401
- async runExpandContent(request: $_model.RunExpandContentRequest): Promise<$_model.RunExpandContentResponse> {
7402
- let runtime = new $dara.RuntimeOptions({ });
7403
- return await this.runExpandContentWithOptions(request, runtime);
9952
+ for await (let resp of sseResp) {
9953
+ let data = JSON.parse(resp.event.data);
9954
+ yield $dara.cast<$_model.RunSummaryGenerateResponse>({
9955
+ statusCode: resp.statusCode,
9956
+ headers: resp.headers,
9957
+ body: {
9958
+ ...data,
9959
+ RequestId: resp.event.id,
9960
+ Message: resp.event.event,
9961
+ },
9962
+ }, new $_model.RunSummaryGenerateResponse({}));
9963
+ }
7404
9964
  }
7405
9965
 
7406
9966
  /**
7407
- * 妙读猜你想问接口
9967
+ * 内容摘要生成
7408
9968
  *
7409
- * @param request - RunGenerateQuestionsRequest
9969
+ * @param request - RunSummaryGenerateRequest
7410
9970
  * @param runtime - runtime options for this request RuntimeOptions
7411
- * @returns RunGenerateQuestionsResponse
9971
+ * @returns RunSummaryGenerateResponse
7412
9972
  */
7413
- async runGenerateQuestionsWithOptions(request: $_model.RunGenerateQuestionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunGenerateQuestionsResponse> {
9973
+ async runSummaryGenerateWithOptions(request: $_model.RunSummaryGenerateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSummaryGenerateResponse> {
7414
9974
  request.validate();
7415
9975
  let body : {[key: string ]: any} = { };
7416
- if (!$dara.isNull(request.docId)) {
7417
- body["DocId"] = request.docId;
7418
- }
7419
-
7420
- if (!$dara.isNull(request.modelName)) {
7421
- body["ModelName"] = request.modelName;
7422
- }
7423
-
7424
- if (!$dara.isNull(request.referenceContent)) {
7425
- body["ReferenceContent"] = request.referenceContent;
9976
+ if (!$dara.isNull(request.content)) {
9977
+ body["Content"] = request.content;
7426
9978
  }
7427
9979
 
7428
- if (!$dara.isNull(request.sessionId)) {
7429
- body["SessionId"] = request.sessionId;
9980
+ if (!$dara.isNull(request.prompt)) {
9981
+ body["Prompt"] = request.prompt;
7430
9982
  }
7431
9983
 
7432
9984
  if (!$dara.isNull(request.workspaceId)) {
@@ -7437,7 +9989,7 @@ export default class Client extends OpenApi {
7437
9989
  body: OpenApiUtil.parseToMap(body),
7438
9990
  });
7439
9991
  let params = new $OpenApiUtil.Params({
7440
- action: "RunGenerateQuestions",
9992
+ action: "RunSummaryGenerate",
7441
9993
  version: "2023-08-01",
7442
9994
  protocol: "HTTPS",
7443
9995
  pathname: "/",
@@ -7447,50 +9999,38 @@ export default class Client extends OpenApi {
7447
9999
  reqBodyType: "formData",
7448
10000
  bodyType: "json",
7449
10001
  });
7450
- return $dara.cast<$_model.RunGenerateQuestionsResponse>(await this.callApi(params, req, runtime), new $_model.RunGenerateQuestionsResponse({}));
10002
+ return $dara.cast<$_model.RunSummaryGenerateResponse>(await this.callApi(params, req, runtime), new $_model.RunSummaryGenerateResponse({}));
7451
10003
  }
7452
10004
 
7453
10005
  /**
7454
- * 妙读猜你想问接口
10006
+ * 内容摘要生成
7455
10007
  *
7456
- * @param request - RunGenerateQuestionsRequest
7457
- * @returns RunGenerateQuestionsResponse
10008
+ * @param request - RunSummaryGenerateRequest
10009
+ * @returns RunSummaryGenerateResponse
7458
10010
  */
7459
- async runGenerateQuestions(request: $_model.RunGenerateQuestionsRequest): Promise<$_model.RunGenerateQuestionsResponse> {
10011
+ async runSummaryGenerate(request: $_model.RunSummaryGenerateRequest): Promise<$_model.RunSummaryGenerateResponse> {
7460
10012
  let runtime = new $dara.RuntimeOptions({ });
7461
- return await this.runGenerateQuestionsWithOptions(request, runtime);
10013
+ return await this.runSummaryGenerateWithOptions(request, runtime);
7462
10014
  }
7463
10015
 
7464
10016
  /**
7465
- * 妙读文档关键词抽取接口
10017
+ * 创作-文本润色
7466
10018
  *
7467
- * @param request - RunHotwordRequest
10019
+ * @param request - RunTextPolishingRequest
7468
10020
  * @param runtime - runtime options for this request RuntimeOptions
7469
- * @returns RunHotwordResponse
10021
+ * @returns RunTextPolishingResponse
7470
10022
  */
7471
- async runHotwordWithOptions(request: $_model.RunHotwordRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotwordResponse> {
10023
+ async *runTextPolishingWithSSE(request: $_model.RunTextPolishingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTextPolishingResponse, any, unknown> {
7472
10024
  request.validate();
7473
10025
  let body : {[key: string ]: any} = { };
7474
- if (!$dara.isNull(request.docId)) {
7475
- body["DocId"] = request.docId;
7476
- }
7477
-
7478
- if (!$dara.isNull(request.modelName)) {
7479
- body["ModelName"] = request.modelName;
10026
+ if (!$dara.isNull(request.content)) {
10027
+ body["Content"] = request.content;
7480
10028
  }
7481
10029
 
7482
10030
  if (!$dara.isNull(request.prompt)) {
7483
10031
  body["Prompt"] = request.prompt;
7484
10032
  }
7485
10033
 
7486
- if (!$dara.isNull(request.referenceContent)) {
7487
- body["ReferenceContent"] = request.referenceContent;
7488
- }
7489
-
7490
- if (!$dara.isNull(request.sessionId)) {
7491
- body["SessionId"] = request.sessionId;
7492
- }
7493
-
7494
10034
  if (!$dara.isNull(request.workspaceId)) {
7495
10035
  body["WorkspaceId"] = request.workspaceId;
7496
10036
  }
@@ -7499,7 +10039,7 @@ export default class Client extends OpenApi {
7499
10039
  body: OpenApiUtil.parseToMap(body),
7500
10040
  });
7501
10041
  let params = new $OpenApiUtil.Params({
7502
- action: "RunHotword",
10042
+ action: "RunTextPolishing",
7503
10043
  version: "2023-08-01",
7504
10044
  protocol: "HTTPS",
7505
10045
  pathname: "/",
@@ -7509,48 +10049,40 @@ export default class Client extends OpenApi {
7509
10049
  reqBodyType: "formData",
7510
10050
  bodyType: "json",
7511
10051
  });
7512
- return $dara.cast<$_model.RunHotwordResponse>(await this.callApi(params, req, runtime), new $_model.RunHotwordResponse({}));
7513
- }
10052
+ let sseResp = await this.callSSEApi(params, req, runtime);
7514
10053
 
7515
- /**
7516
- * 妙读文档关键词抽取接口
7517
- *
7518
- * @param request - RunHotwordRequest
7519
- * @returns RunHotwordResponse
7520
- */
7521
- async runHotword(request: $_model.RunHotwordRequest): Promise<$_model.RunHotwordResponse> {
7522
- let runtime = new $dara.RuntimeOptions({ });
7523
- return await this.runHotwordWithOptions(request, runtime);
10054
+ for await (let resp of sseResp) {
10055
+ let data = JSON.parse(resp.event.data);
10056
+ yield $dara.cast<$_model.RunTextPolishingResponse>({
10057
+ statusCode: resp.statusCode,
10058
+ headers: resp.headers,
10059
+ body: {
10060
+ ...data,
10061
+ RequestId: resp.event.id,
10062
+ Message: resp.event.event,
10063
+ },
10064
+ }, new $_model.RunTextPolishingResponse({}));
10065
+ }
7524
10066
  }
7525
10067
 
7526
10068
  /**
7527
- * AI妙笔-创作-抽取关键词
10069
+ * 创作-文本润色
7528
10070
  *
7529
- * @param tmpReq - RunKeywordsExtractionGenerationRequest
10071
+ * @param request - RunTextPolishingRequest
7530
10072
  * @param runtime - runtime options for this request RuntimeOptions
7531
- * @returns RunKeywordsExtractionGenerationResponse
10073
+ * @returns RunTextPolishingResponse
7532
10074
  */
7533
- async runKeywordsExtractionGenerationWithOptions(tmpReq: $_model.RunKeywordsExtractionGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
7534
- tmpReq.validate();
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");
10075
+ async runTextPolishingWithOptions(request: $_model.RunTextPolishingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTextPolishingResponse> {
10076
+ request.validate();
10077
+ let body : {[key: string ]: any} = { };
10078
+ if (!$dara.isNull(request.content)) {
10079
+ body["Content"] = request.content;
7539
10080
  }
7540
10081
 
7541
- let body : {[key: string ]: any} = { };
7542
10082
  if (!$dara.isNull(request.prompt)) {
7543
10083
  body["Prompt"] = request.prompt;
7544
10084
  }
7545
10085
 
7546
- if (!$dara.isNull(request.referenceDataShrink)) {
7547
- body["ReferenceData"] = request.referenceDataShrink;
7548
- }
7549
-
7550
- if (!$dara.isNull(request.taskId)) {
7551
- body["TaskId"] = request.taskId;
7552
- }
7553
-
7554
10086
  if (!$dara.isNull(request.workspaceId)) {
7555
10087
  body["WorkspaceId"] = request.workspaceId;
7556
10088
  }
@@ -7559,7 +10091,7 @@ export default class Client extends OpenApi {
7559
10091
  body: OpenApiUtil.parseToMap(body),
7560
10092
  });
7561
10093
  let params = new $OpenApiUtil.Params({
7562
- action: "RunKeywordsExtractionGeneration",
10094
+ action: "RunTextPolishing",
7563
10095
  version: "2023-08-01",
7564
10096
  protocol: "HTTPS",
7565
10097
  pathname: "/",
@@ -7569,54 +10101,54 @@ export default class Client extends OpenApi {
7569
10101
  reqBodyType: "formData",
7570
10102
  bodyType: "json",
7571
10103
  });
7572
- return $dara.cast<$_model.RunKeywordsExtractionGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunKeywordsExtractionGenerationResponse({}));
10104
+ return $dara.cast<$_model.RunTextPolishingResponse>(await this.callApi(params, req, runtime), new $_model.RunTextPolishingResponse({}));
7573
10105
  }
7574
10106
 
7575
10107
  /**
7576
- * AI妙笔-创作-抽取关键词
10108
+ * 创作-文本润色
7577
10109
  *
7578
- * @param request - RunKeywordsExtractionGenerationRequest
7579
- * @returns RunKeywordsExtractionGenerationResponse
10110
+ * @param request - RunTextPolishingRequest
10111
+ * @returns RunTextPolishingResponse
7580
10112
  */
7581
- async runKeywordsExtractionGeneration(request: $_model.RunKeywordsExtractionGenerationRequest): Promise<$_model.RunKeywordsExtractionGenerationResponse> {
10113
+ async runTextPolishing(request: $_model.RunTextPolishingRequest): Promise<$_model.RunTextPolishingResponse> {
7582
10114
  let runtime = new $dara.RuntimeOptions({ });
7583
- return await this.runKeywordsExtractionGenerationWithOptions(request, runtime);
10115
+ return await this.runTextPolishingWithOptions(request, runtime);
7584
10116
  }
7585
10117
 
7586
10118
  /**
7587
- * 文档批量导读
10119
+ * 妙笔:标题生成
7588
10120
  *
7589
- * @param tmpReq - RunMultiDocIntroductionRequest
10121
+ * @param tmpReq - RunTitleGenerationRequest
7590
10122
  * @param runtime - runtime options for this request RuntimeOptions
7591
- * @returns RunMultiDocIntroductionResponse
10123
+ * @returns RunTitleGenerationResponse
7592
10124
  */
7593
- async runMultiDocIntroductionWithOptions(tmpReq: $_model.RunMultiDocIntroductionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunMultiDocIntroductionResponse> {
10125
+ async *runTitleGenerationWithSSE(tmpReq: $_model.RunTitleGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTitleGenerationResponse, any, unknown> {
7594
10126
  tmpReq.validate();
7595
- let request = new $_model.RunMultiDocIntroductionShrinkRequest({ });
10127
+ let request = new $_model.RunTitleGenerationShrinkRequest({ });
7596
10128
  OpenApiUtil.convert(tmpReq, request);
7597
- if (!$dara.isNull(tmpReq.docIds)) {
7598
- request.docIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.docIds, "DocIds", "json");
10129
+ if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
10130
+ request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
7599
10131
  }
7600
10132
 
7601
- let body : {[key: string ]: any} = { };
7602
- if (!$dara.isNull(request.docIdsShrink)) {
7603
- body["DocIds"] = request.docIdsShrink;
10133
+ if (!$dara.isNull(tmpReq.referenceData)) {
10134
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
7604
10135
  }
7605
10136
 
7606
- if (!$dara.isNull(request.keyPointPrompt)) {
7607
- body["KeyPointPrompt"] = request.keyPointPrompt;
10137
+ let body : {[key: string ]: any} = { };
10138
+ if (!$dara.isNull(request.deduplicatedTitlesShrink)) {
10139
+ body["DeduplicatedTitles"] = request.deduplicatedTitlesShrink;
7608
10140
  }
7609
10141
 
7610
- if (!$dara.isNull(request.modelName)) {
7611
- body["ModelName"] = request.modelName;
10142
+ if (!$dara.isNull(request.referenceDataShrink)) {
10143
+ body["ReferenceData"] = request.referenceDataShrink;
7612
10144
  }
7613
10145
 
7614
- if (!$dara.isNull(request.sessionId)) {
7615
- body["SessionId"] = request.sessionId;
10146
+ if (!$dara.isNull(request.taskId)) {
10147
+ body["TaskId"] = request.taskId;
7616
10148
  }
7617
10149
 
7618
- if (!$dara.isNull(request.summaryPrompt)) {
7619
- body["SummaryPrompt"] = request.summaryPrompt;
10150
+ if (!$dara.isNull(request.titleCount)) {
10151
+ body["TitleCount"] = request.titleCount;
7620
10152
  }
7621
10153
 
7622
10154
  if (!$dara.isNull(request.workspaceId)) {
@@ -7627,7 +10159,7 @@ export default class Client extends OpenApi {
7627
10159
  body: OpenApiUtil.parseToMap(body),
7628
10160
  });
7629
10161
  let params = new $OpenApiUtil.Params({
7630
- action: "RunMultiDocIntroduction",
10162
+ action: "RunTitleGeneration",
7631
10163
  version: "2023-08-01",
7632
10164
  protocol: "HTTPS",
7633
10165
  pathname: "/",
@@ -7637,64 +10169,58 @@ export default class Client extends OpenApi {
7637
10169
  reqBodyType: "formData",
7638
10170
  bodyType: "json",
7639
10171
  });
7640
- return $dara.cast<$_model.RunMultiDocIntroductionResponse>(await this.callApi(params, req, runtime), new $_model.RunMultiDocIntroductionResponse({}));
7641
- }
10172
+ let sseResp = await this.callSSEApi(params, req, runtime);
7642
10173
 
7643
- /**
7644
- * 文档批量导读
7645
- *
7646
- * @param request - RunMultiDocIntroductionRequest
7647
- * @returns RunMultiDocIntroductionResponse
7648
- */
7649
- async runMultiDocIntroduction(request: $_model.RunMultiDocIntroductionRequest): Promise<$_model.RunMultiDocIntroductionResponse> {
7650
- let runtime = new $dara.RuntimeOptions({ });
7651
- return await this.runMultiDocIntroductionWithOptions(request, runtime);
10174
+ for await (let resp of sseResp) {
10175
+ let data = JSON.parse(resp.event.data);
10176
+ yield $dara.cast<$_model.RunTitleGenerationResponse>({
10177
+ statusCode: resp.statusCode,
10178
+ headers: resp.headers,
10179
+ body: {
10180
+ ...data,
10181
+ RequestId: resp.event.id,
10182
+ Message: resp.event.event,
10183
+ },
10184
+ }, new $_model.RunTitleGenerationResponse({}));
10185
+ }
7652
10186
  }
7653
10187
 
7654
10188
  /**
7655
- * AI妙搜-智能搜索生成
10189
+ * 妙笔:标题生成
7656
10190
  *
7657
- * @param tmpReq - RunSearchGenerationRequest
10191
+ * @param tmpReq - RunTitleGenerationRequest
7658
10192
  * @param runtime - runtime options for this request RuntimeOptions
7659
- * @returns RunSearchGenerationResponse
10193
+ * @returns RunTitleGenerationResponse
7660
10194
  */
7661
- async runSearchGenerationWithOptions(tmpReq: $_model.RunSearchGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchGenerationResponse> {
10195
+ async runTitleGenerationWithOptions(tmpReq: $_model.RunTitleGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTitleGenerationResponse> {
7662
10196
  tmpReq.validate();
7663
- let request = new $_model.RunSearchGenerationShrinkRequest({ });
10197
+ let request = new $_model.RunTitleGenerationShrinkRequest({ });
7664
10198
  OpenApiUtil.convert(tmpReq, request);
7665
- if (!$dara.isNull(tmpReq.agentContext)) {
7666
- request.agentContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentContext, "AgentContext", "json");
10199
+ if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
10200
+ request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
7667
10201
  }
7668
10202
 
7669
- if (!$dara.isNull(tmpReq.chatConfig)) {
7670
- request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
10203
+ if (!$dara.isNull(tmpReq.referenceData)) {
10204
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
7671
10205
  }
7672
10206
 
7673
10207
  let body : {[key: string ]: any} = { };
7674
- if (!$dara.isNull(request.agentContextShrink)) {
7675
- body["AgentContext"] = request.agentContextShrink;
7676
- }
7677
-
7678
- if (!$dara.isNull(request.chatConfigShrink)) {
7679
- body["ChatConfig"] = request.chatConfigShrink;
7680
- }
7681
-
7682
- if (!$dara.isNull(request.modelId)) {
7683
- body["ModelId"] = request.modelId;
7684
- }
7685
-
7686
- if (!$dara.isNull(request.originalSessionId)) {
7687
- body["OriginalSessionId"] = request.originalSessionId;
10208
+ if (!$dara.isNull(request.deduplicatedTitlesShrink)) {
10209
+ body["DeduplicatedTitles"] = request.deduplicatedTitlesShrink;
7688
10210
  }
7689
10211
 
7690
- if (!$dara.isNull(request.prompt)) {
7691
- body["Prompt"] = request.prompt;
10212
+ if (!$dara.isNull(request.referenceDataShrink)) {
10213
+ body["ReferenceData"] = request.referenceDataShrink;
7692
10214
  }
7693
10215
 
7694
10216
  if (!$dara.isNull(request.taskId)) {
7695
10217
  body["TaskId"] = request.taskId;
7696
10218
  }
7697
10219
 
10220
+ if (!$dara.isNull(request.titleCount)) {
10221
+ body["TitleCount"] = request.titleCount;
10222
+ }
10223
+
7698
10224
  if (!$dara.isNull(request.workspaceId)) {
7699
10225
  body["WorkspaceId"] = request.workspaceId;
7700
10226
  }
@@ -7703,7 +10229,7 @@ export default class Client extends OpenApi {
7703
10229
  body: OpenApiUtil.parseToMap(body),
7704
10230
  });
7705
10231
  let params = new $OpenApiUtil.Params({
7706
- action: "RunSearchGeneration",
10232
+ action: "RunTitleGeneration",
7707
10233
  version: "2023-08-01",
7708
10234
  protocol: "HTTPS",
7709
10235
  pathname: "/",
@@ -7713,50 +10239,46 @@ export default class Client extends OpenApi {
7713
10239
  reqBodyType: "formData",
7714
10240
  bodyType: "json",
7715
10241
  });
7716
- return $dara.cast<$_model.RunSearchGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchGenerationResponse({}));
10242
+ return $dara.cast<$_model.RunTitleGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTitleGenerationResponse({}));
7717
10243
  }
7718
10244
 
7719
10245
  /**
7720
- * AI妙搜-智能搜索生成
10246
+ * 妙笔:标题生成
7721
10247
  *
7722
- * @param request - RunSearchGenerationRequest
7723
- * @returns RunSearchGenerationResponse
10248
+ * @param request - RunTitleGenerationRequest
10249
+ * @returns RunTitleGenerationResponse
7724
10250
  */
7725
- async runSearchGeneration(request: $_model.RunSearchGenerationRequest): Promise<$_model.RunSearchGenerationResponse> {
10251
+ async runTitleGeneration(request: $_model.RunTitleGenerationRequest): Promise<$_model.RunTitleGenerationResponse> {
7726
10252
  let runtime = new $dara.RuntimeOptions({ });
7727
- return await this.runSearchGenerationWithOptions(request, runtime);
10253
+ return await this.runTitleGenerationWithOptions(request, runtime);
7728
10254
  }
7729
10255
 
7730
10256
  /**
7731
- * 妙搜-文搜文
10257
+ * AI妙笔-创作-中英文翻译
7732
10258
  *
7733
- * @param tmpReq - RunSearchSimilarArticlesRequest
10259
+ * @param tmpReq - RunTranslateGenerationRequest
7734
10260
  * @param runtime - runtime options for this request RuntimeOptions
7735
- * @returns RunSearchSimilarArticlesResponse
10261
+ * @returns RunTranslateGenerationResponse
7736
10262
  */
7737
- async runSearchSimilarArticlesWithOptions(tmpReq: $_model.RunSearchSimilarArticlesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSearchSimilarArticlesResponse> {
10263
+ async *runTranslateGenerationWithSSE(tmpReq: $_model.RunTranslateGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTranslateGenerationResponse, any, unknown> {
7738
10264
  tmpReq.validate();
7739
- let request = new $_model.RunSearchSimilarArticlesShrinkRequest({ });
10265
+ let request = new $_model.RunTranslateGenerationShrinkRequest({ });
7740
10266
  OpenApiUtil.convert(tmpReq, request);
7741
- if (!$dara.isNull(tmpReq.chatConfig)) {
7742
- request.chatConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.chatConfig, "ChatConfig", "json");
10267
+ if (!$dara.isNull(tmpReq.referenceData)) {
10268
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
7743
10269
  }
7744
10270
 
7745
10271
  let body : {[key: string ]: any} = { };
7746
- if (!$dara.isNull(request.chatConfigShrink)) {
7747
- body["ChatConfig"] = request.chatConfigShrink;
7748
- }
7749
-
7750
- if (!$dara.isNull(request.docType)) {
7751
- body["DocType"] = request.docType;
10272
+ if (!$dara.isNull(request.prompt)) {
10273
+ body["Prompt"] = request.prompt;
7752
10274
  }
7753
10275
 
7754
- if (!$dara.isNull(request.title)) {
7755
- body["Title"] = request.title;
10276
+ if (!$dara.isNull(request.referenceDataShrink)) {
10277
+ body["ReferenceData"] = request.referenceDataShrink;
7756
10278
  }
7757
10279
 
7758
- if (!$dara.isNull(request.url)) {
7759
- body["Url"] = request.url;
10280
+ if (!$dara.isNull(request.taskId)) {
10281
+ body["TaskId"] = request.taskId;
7760
10282
  }
7761
10283
 
7762
10284
  if (!$dara.isNull(request.workspaceId)) {
@@ -7767,7 +10289,7 @@ export default class Client extends OpenApi {
7767
10289
  body: OpenApiUtil.parseToMap(body),
7768
10290
  });
7769
10291
  let params = new $OpenApiUtil.Params({
7770
- action: "RunSearchSimilarArticles",
10292
+ action: "RunTranslateGeneration",
7771
10293
  version: "2023-08-01",
7772
10294
  protocol: "HTTPS",
7773
10295
  pathname: "/",
@@ -7777,44 +10299,38 @@ export default class Client extends OpenApi {
7777
10299
  reqBodyType: "formData",
7778
10300
  bodyType: "json",
7779
10301
  });
7780
- return $dara.cast<$_model.RunSearchSimilarArticlesResponse>(await this.callApi(params, req, runtime), new $_model.RunSearchSimilarArticlesResponse({}));
7781
- }
10302
+ let sseResp = await this.callSSEApi(params, req, runtime);
7782
10303
 
7783
- /**
7784
- * 妙搜-文搜文
7785
- *
7786
- * @param request - RunSearchSimilarArticlesRequest
7787
- * @returns RunSearchSimilarArticlesResponse
7788
- */
7789
- async runSearchSimilarArticles(request: $_model.RunSearchSimilarArticlesRequest): Promise<$_model.RunSearchSimilarArticlesResponse> {
7790
- let runtime = new $dara.RuntimeOptions({ });
7791
- return await this.runSearchSimilarArticlesWithOptions(request, runtime);
10304
+ for await (let resp of sseResp) {
10305
+ let data = JSON.parse(resp.event.data);
10306
+ yield $dara.cast<$_model.RunTranslateGenerationResponse>({
10307
+ statusCode: resp.statusCode,
10308
+ headers: resp.headers,
10309
+ body: {
10310
+ ...data,
10311
+ RequestId: resp.event.id,
10312
+ Message: resp.event.event,
10313
+ },
10314
+ }, new $_model.RunTranslateGenerationResponse({}));
10315
+ }
7792
10316
  }
7793
10317
 
7794
10318
  /**
7795
- * 创作-分步骤写作
10319
+ * AI妙笔-创作-中英文翻译
7796
10320
  *
7797
- * @param tmpReq - RunStepByStepWritingRequest
10321
+ * @param tmpReq - RunTranslateGenerationRequest
7798
10322
  * @param runtime - runtime options for this request RuntimeOptions
7799
- * @returns RunStepByStepWritingResponse
10323
+ * @returns RunTranslateGenerationResponse
7800
10324
  */
7801
- async runStepByStepWritingWithOptions(tmpReq: $_model.RunStepByStepWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStepByStepWritingResponse> {
10325
+ async runTranslateGenerationWithOptions(tmpReq: $_model.RunTranslateGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTranslateGenerationResponse> {
7802
10326
  tmpReq.validate();
7803
- let request = new $_model.RunStepByStepWritingShrinkRequest({ });
10327
+ let request = new $_model.RunTranslateGenerationShrinkRequest({ });
7804
10328
  OpenApiUtil.convert(tmpReq, request);
7805
10329
  if (!$dara.isNull(tmpReq.referenceData)) {
7806
10330
  request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
7807
10331
  }
7808
10332
 
7809
- if (!$dara.isNull(tmpReq.writingConfig)) {
7810
- request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
7811
- }
7812
-
7813
10333
  let body : {[key: string ]: any} = { };
7814
- if (!$dara.isNull(request.originSessionId)) {
7815
- body["OriginSessionId"] = request.originSessionId;
7816
- }
7817
-
7818
10334
  if (!$dara.isNull(request.prompt)) {
7819
10335
  body["Prompt"] = request.prompt;
7820
10336
  }
@@ -7823,10 +10339,6 @@ export default class Client extends OpenApi {
7823
10339
  body["ReferenceData"] = request.referenceDataShrink;
7824
10340
  }
7825
10341
 
7826
- if (!$dara.isNull(request.sessionId)) {
7827
- body["SessionId"] = request.sessionId;
7828
- }
7829
-
7830
10342
  if (!$dara.isNull(request.taskId)) {
7831
10343
  body["TaskId"] = request.taskId;
7832
10344
  }
@@ -7835,15 +10347,11 @@ export default class Client extends OpenApi {
7835
10347
  body["WorkspaceId"] = request.workspaceId;
7836
10348
  }
7837
10349
 
7838
- if (!$dara.isNull(request.writingConfigShrink)) {
7839
- body["WritingConfig"] = request.writingConfigShrink;
7840
- }
7841
-
7842
10350
  let req = new $OpenApiUtil.OpenApiRequest({
7843
10351
  body: OpenApiUtil.parseToMap(body),
7844
10352
  });
7845
10353
  let params = new $OpenApiUtil.Params({
7846
- action: "RunStepByStepWriting",
10354
+ action: "RunTranslateGeneration",
7847
10355
  version: "2023-08-01",
7848
10356
  protocol: "HTTPS",
7849
10357
  pathname: "/",
@@ -7853,46 +10361,48 @@ export default class Client extends OpenApi {
7853
10361
  reqBodyType: "formData",
7854
10362
  bodyType: "json",
7855
10363
  });
7856
- return $dara.cast<$_model.RunStepByStepWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunStepByStepWritingResponse({}));
10364
+ return $dara.cast<$_model.RunTranslateGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTranslateGenerationResponse({}));
7857
10365
  }
7858
10366
 
7859
10367
  /**
7860
- * 创作-分步骤写作
10368
+ * AI妙笔-创作-中英文翻译
7861
10369
  *
7862
- * @param request - RunStepByStepWritingRequest
7863
- * @returns RunStepByStepWritingResponse
10370
+ * @param request - RunTranslateGenerationRequest
10371
+ * @returns RunTranslateGenerationResponse
7864
10372
  */
7865
- async runStepByStepWriting(request: $_model.RunStepByStepWritingRequest): Promise<$_model.RunStepByStepWritingResponse> {
10373
+ async runTranslateGeneration(request: $_model.RunTranslateGenerationRequest): Promise<$_model.RunTranslateGenerationResponse> {
7866
10374
  let runtime = new $dara.RuntimeOptions({ });
7867
- return await this.runStepByStepWritingWithOptions(request, runtime);
10375
+ return await this.runTranslateGenerationWithOptions(request, runtime);
7868
10376
  }
7869
10377
 
7870
10378
  /**
7871
- * 内容特点分析
10379
+ * AI生成视频剪辑脚本
7872
10380
  *
7873
- * @param tmpReq - RunStyleFeatureAnalysisRequest
10381
+ * @param request - RunVideoScriptGenerateRequest
7874
10382
  * @param runtime - runtime options for this request RuntimeOptions
7875
- * @returns RunStyleFeatureAnalysisResponse
10383
+ * @returns RunVideoScriptGenerateResponse
7876
10384
  */
7877
- async runStyleFeatureAnalysisWithOptions(tmpReq: $_model.RunStyleFeatureAnalysisRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunStyleFeatureAnalysisResponse> {
7878
- tmpReq.validate();
7879
- let request = new $_model.RunStyleFeatureAnalysisShrinkRequest({ });
7880
- OpenApiUtil.convert(tmpReq, request);
7881
- if (!$dara.isNull(tmpReq.contents)) {
7882
- request.contentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contents, "Contents", "json");
10385
+ async *runVideoScriptGenerateWithSSE(request: $_model.RunVideoScriptGenerateRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunVideoScriptGenerateResponse, any, unknown> {
10386
+ request.validate();
10387
+ let body : {[key: string ]: any} = { };
10388
+ if (!$dara.isNull(request.language)) {
10389
+ body["Language"] = request.language;
7883
10390
  }
7884
10391
 
7885
- if (!$dara.isNull(tmpReq.materialIds)) {
7886
- request.materialIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.materialIds, "MaterialIds", "json");
10392
+ if (!$dara.isNull(request.prompt)) {
10393
+ body["Prompt"] = request.prompt;
7887
10394
  }
7888
10395
 
7889
- let body : {[key: string ]: any} = { };
7890
- if (!$dara.isNull(request.contentsShrink)) {
7891
- body["Contents"] = request.contentsShrink;
10396
+ if (!$dara.isNull(request.scriptLength)) {
10397
+ body["ScriptLength"] = request.scriptLength;
7892
10398
  }
7893
10399
 
7894
- if (!$dara.isNull(request.materialIdsShrink)) {
7895
- body["MaterialIds"] = request.materialIdsShrink;
10400
+ if (!$dara.isNull(request.scriptNumber)) {
10401
+ body["ScriptNumber"] = request.scriptNumber;
10402
+ }
10403
+
10404
+ if (!$dara.isNull(request.useSearch)) {
10405
+ body["UseSearch"] = request.useSearch;
7896
10406
  }
7897
10407
 
7898
10408
  if (!$dara.isNull(request.workspaceId)) {
@@ -7903,7 +10413,7 @@ export default class Client extends OpenApi {
7903
10413
  body: OpenApiUtil.parseToMap(body),
7904
10414
  });
7905
10415
  let params = new $OpenApiUtil.Params({
7906
- action: "RunStyleFeatureAnalysis",
10416
+ action: "RunVideoScriptGenerate",
7907
10417
  version: "2023-08-01",
7908
10418
  protocol: "HTTPS",
7909
10419
  pathname: "/",
@@ -7913,38 +10423,52 @@ export default class Client extends OpenApi {
7913
10423
  reqBodyType: "formData",
7914
10424
  bodyType: "json",
7915
10425
  });
7916
- return $dara.cast<$_model.RunStyleFeatureAnalysisResponse>(await this.callApi(params, req, runtime), new $_model.RunStyleFeatureAnalysisResponse({}));
7917
- }
10426
+ let sseResp = await this.callSSEApi(params, req, runtime);
7918
10427
 
7919
- /**
7920
- * 内容特点分析
7921
- *
7922
- * @param request - RunStyleFeatureAnalysisRequest
7923
- * @returns RunStyleFeatureAnalysisResponse
7924
- */
7925
- async runStyleFeatureAnalysis(request: $_model.RunStyleFeatureAnalysisRequest): Promise<$_model.RunStyleFeatureAnalysisResponse> {
7926
- let runtime = new $dara.RuntimeOptions({ });
7927
- return await this.runStyleFeatureAnalysisWithOptions(request, runtime);
10428
+ for await (let resp of sseResp) {
10429
+ let data = JSON.parse(resp.event.data);
10430
+ yield $dara.cast<$_model.RunVideoScriptGenerateResponse>({
10431
+ statusCode: resp.statusCode,
10432
+ headers: resp.headers,
10433
+ body: {
10434
+ ...data,
10435
+ RequestId: resp.event.id,
10436
+ Message: resp.event.event,
10437
+ },
10438
+ }, new $_model.RunVideoScriptGenerateResponse({}));
10439
+ }
7928
10440
  }
7929
10441
 
7930
10442
  /**
7931
- * 内容摘要生成
10443
+ * AI生成视频剪辑脚本
7932
10444
  *
7933
- * @param request - RunSummaryGenerateRequest
10445
+ * @param request - RunVideoScriptGenerateRequest
7934
10446
  * @param runtime - runtime options for this request RuntimeOptions
7935
- * @returns RunSummaryGenerateResponse
10447
+ * @returns RunVideoScriptGenerateResponse
7936
10448
  */
7937
- async runSummaryGenerateWithOptions(request: $_model.RunSummaryGenerateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunSummaryGenerateResponse> {
10449
+ async runVideoScriptGenerateWithOptions(request: $_model.RunVideoScriptGenerateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunVideoScriptGenerateResponse> {
7938
10450
  request.validate();
7939
10451
  let body : {[key: string ]: any} = { };
7940
- if (!$dara.isNull(request.content)) {
7941
- body["Content"] = request.content;
10452
+ if (!$dara.isNull(request.language)) {
10453
+ body["Language"] = request.language;
7942
10454
  }
7943
10455
 
7944
10456
  if (!$dara.isNull(request.prompt)) {
7945
10457
  body["Prompt"] = request.prompt;
7946
10458
  }
7947
10459
 
10460
+ if (!$dara.isNull(request.scriptLength)) {
10461
+ body["ScriptLength"] = request.scriptLength;
10462
+ }
10463
+
10464
+ if (!$dara.isNull(request.scriptNumber)) {
10465
+ body["ScriptNumber"] = request.scriptNumber;
10466
+ }
10467
+
10468
+ if (!$dara.isNull(request.useSearch)) {
10469
+ body["UseSearch"] = request.useSearch;
10470
+ }
10471
+
7948
10472
  if (!$dara.isNull(request.workspaceId)) {
7949
10473
  body["WorkspaceId"] = request.workspaceId;
7950
10474
  }
@@ -7953,7 +10477,7 @@ export default class Client extends OpenApi {
7953
10477
  body: OpenApiUtil.parseToMap(body),
7954
10478
  });
7955
10479
  let params = new $OpenApiUtil.Params({
7956
- action: "RunSummaryGenerate",
10480
+ action: "RunVideoScriptGenerate",
7957
10481
  version: "2023-08-01",
7958
10482
  protocol: "HTTPS",
7959
10483
  pathname: "/",
@@ -7963,38 +10487,48 @@ export default class Client extends OpenApi {
7963
10487
  reqBodyType: "formData",
7964
10488
  bodyType: "json",
7965
10489
  });
7966
- return $dara.cast<$_model.RunSummaryGenerateResponse>(await this.callApi(params, req, runtime), new $_model.RunSummaryGenerateResponse({}));
10490
+ return $dara.cast<$_model.RunVideoScriptGenerateResponse>(await this.callApi(params, req, runtime), new $_model.RunVideoScriptGenerateResponse({}));
7967
10491
  }
7968
10492
 
7969
10493
  /**
7970
- * 内容摘要生成
10494
+ * AI生成视频剪辑脚本
7971
10495
  *
7972
- * @param request - RunSummaryGenerateRequest
7973
- * @returns RunSummaryGenerateResponse
10496
+ * @param request - RunVideoScriptGenerateRequest
10497
+ * @returns RunVideoScriptGenerateResponse
7974
10498
  */
7975
- async runSummaryGenerate(request: $_model.RunSummaryGenerateRequest): Promise<$_model.RunSummaryGenerateResponse> {
10499
+ async runVideoScriptGenerate(request: $_model.RunVideoScriptGenerateRequest): Promise<$_model.RunVideoScriptGenerateResponse> {
7976
10500
  let runtime = new $dara.RuntimeOptions({ });
7977
- return await this.runSummaryGenerateWithOptions(request, runtime);
10501
+ return await this.runVideoScriptGenerateWithOptions(request, runtime);
7978
10502
  }
7979
10503
 
7980
10504
  /**
7981
- * 创作-文本润色
10505
+ * AI妙笔-创作-文风改写
7982
10506
  *
7983
- * @param request - RunTextPolishingRequest
10507
+ * @param tmpReq - RunWriteToneGenerationRequest
7984
10508
  * @param runtime - runtime options for this request RuntimeOptions
7985
- * @returns RunTextPolishingResponse
10509
+ * @returns RunWriteToneGenerationResponse
7986
10510
  */
7987
- async runTextPolishingWithOptions(request: $_model.RunTextPolishingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTextPolishingResponse> {
7988
- request.validate();
7989
- let body : {[key: string ]: any} = { };
7990
- if (!$dara.isNull(request.content)) {
7991
- body["Content"] = request.content;
10511
+ async *runWriteToneGenerationWithSSE(tmpReq: $_model.RunWriteToneGenerationRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWriteToneGenerationResponse, any, unknown> {
10512
+ tmpReq.validate();
10513
+ let request = new $_model.RunWriteToneGenerationShrinkRequest({ });
10514
+ OpenApiUtil.convert(tmpReq, request);
10515
+ if (!$dara.isNull(tmpReq.referenceData)) {
10516
+ request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
7992
10517
  }
7993
10518
 
10519
+ let body : {[key: string ]: any} = { };
7994
10520
  if (!$dara.isNull(request.prompt)) {
7995
10521
  body["Prompt"] = request.prompt;
7996
10522
  }
7997
10523
 
10524
+ if (!$dara.isNull(request.referenceDataShrink)) {
10525
+ body["ReferenceData"] = request.referenceDataShrink;
10526
+ }
10527
+
10528
+ if (!$dara.isNull(request.taskId)) {
10529
+ body["TaskId"] = request.taskId;
10530
+ }
10531
+
7998
10532
  if (!$dara.isNull(request.workspaceId)) {
7999
10533
  body["WorkspaceId"] = request.workspaceId;
8000
10534
  }
@@ -8003,7 +10537,7 @@ export default class Client extends OpenApi {
8003
10537
  body: OpenApiUtil.parseToMap(body),
8004
10538
  });
8005
10539
  let params = new $OpenApiUtil.Params({
8006
- action: "RunTextPolishing",
10540
+ action: "RunWriteToneGeneration",
8007
10541
  version: "2023-08-01",
8008
10542
  protocol: "HTTPS",
8009
10543
  pathname: "/",
@@ -8013,42 +10547,40 @@ export default class Client extends OpenApi {
8013
10547
  reqBodyType: "formData",
8014
10548
  bodyType: "json",
8015
10549
  });
8016
- return $dara.cast<$_model.RunTextPolishingResponse>(await this.callApi(params, req, runtime), new $_model.RunTextPolishingResponse({}));
8017
- }
10550
+ let sseResp = await this.callSSEApi(params, req, runtime);
8018
10551
 
8019
- /**
8020
- * 创作-文本润色
8021
- *
8022
- * @param request - RunTextPolishingRequest
8023
- * @returns RunTextPolishingResponse
8024
- */
8025
- async runTextPolishing(request: $_model.RunTextPolishingRequest): Promise<$_model.RunTextPolishingResponse> {
8026
- let runtime = new $dara.RuntimeOptions({ });
8027
- return await this.runTextPolishingWithOptions(request, runtime);
10552
+ for await (let resp of sseResp) {
10553
+ let data = JSON.parse(resp.event.data);
10554
+ yield $dara.cast<$_model.RunWriteToneGenerationResponse>({
10555
+ statusCode: resp.statusCode,
10556
+ headers: resp.headers,
10557
+ body: {
10558
+ ...data,
10559
+ RequestId: resp.event.id,
10560
+ Message: resp.event.event,
10561
+ },
10562
+ }, new $_model.RunWriteToneGenerationResponse({}));
10563
+ }
8028
10564
  }
8029
10565
 
8030
10566
  /**
8031
- * 妙笔:标题生成
10567
+ * AI妙笔-创作-文风改写
8032
10568
  *
8033
- * @param tmpReq - RunTitleGenerationRequest
10569
+ * @param tmpReq - RunWriteToneGenerationRequest
8034
10570
  * @param runtime - runtime options for this request RuntimeOptions
8035
- * @returns RunTitleGenerationResponse
10571
+ * @returns RunWriteToneGenerationResponse
8036
10572
  */
8037
- async runTitleGenerationWithOptions(tmpReq: $_model.RunTitleGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTitleGenerationResponse> {
10573
+ async runWriteToneGenerationWithOptions(tmpReq: $_model.RunWriteToneGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunWriteToneGenerationResponse> {
8038
10574
  tmpReq.validate();
8039
- let request = new $_model.RunTitleGenerationShrinkRequest({ });
10575
+ let request = new $_model.RunWriteToneGenerationShrinkRequest({ });
8040
10576
  OpenApiUtil.convert(tmpReq, request);
8041
- if (!$dara.isNull(tmpReq.deduplicatedTitles)) {
8042
- request.deduplicatedTitlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deduplicatedTitles, "DeduplicatedTitles", "json");
8043
- }
8044
-
8045
10577
  if (!$dara.isNull(tmpReq.referenceData)) {
8046
10578
  request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
8047
10579
  }
8048
10580
 
8049
10581
  let body : {[key: string ]: any} = { };
8050
- if (!$dara.isNull(request.deduplicatedTitlesShrink)) {
8051
- body["DeduplicatedTitles"] = request.deduplicatedTitlesShrink;
10582
+ if (!$dara.isNull(request.prompt)) {
10583
+ body["Prompt"] = request.prompt;
8052
10584
  }
8053
10585
 
8054
10586
  if (!$dara.isNull(request.referenceDataShrink)) {
@@ -8059,10 +10591,6 @@ export default class Client extends OpenApi {
8059
10591
  body["TaskId"] = request.taskId;
8060
10592
  }
8061
10593
 
8062
- if (!$dara.isNull(request.titleCount)) {
8063
- body["TitleCount"] = request.titleCount;
8064
- }
8065
-
8066
10594
  if (!$dara.isNull(request.workspaceId)) {
8067
10595
  body["WorkspaceId"] = request.workspaceId;
8068
10596
  }
@@ -8071,7 +10599,7 @@ export default class Client extends OpenApi {
8071
10599
  body: OpenApiUtil.parseToMap(body),
8072
10600
  });
8073
10601
  let params = new $OpenApiUtil.Params({
8074
- action: "RunTitleGeneration",
10602
+ action: "RunWriteToneGeneration",
8075
10603
  version: "2023-08-01",
8076
10604
  protocol: "HTTPS",
8077
10605
  pathname: "/",
@@ -8081,36 +10609,44 @@ export default class Client extends OpenApi {
8081
10609
  reqBodyType: "formData",
8082
10610
  bodyType: "json",
8083
10611
  });
8084
- return $dara.cast<$_model.RunTitleGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTitleGenerationResponse({}));
10612
+ return $dara.cast<$_model.RunWriteToneGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunWriteToneGenerationResponse({}));
8085
10613
  }
8086
10614
 
8087
10615
  /**
8088
- * 妙笔:标题生成
10616
+ * AI妙笔-创作-文风改写
8089
10617
  *
8090
- * @param request - RunTitleGenerationRequest
8091
- * @returns RunTitleGenerationResponse
10618
+ * @param request - RunWriteToneGenerationRequest
10619
+ * @returns RunWriteToneGenerationResponse
8092
10620
  */
8093
- async runTitleGeneration(request: $_model.RunTitleGenerationRequest): Promise<$_model.RunTitleGenerationResponse> {
10621
+ async runWriteToneGeneration(request: $_model.RunWriteToneGenerationRequest): Promise<$_model.RunWriteToneGenerationResponse> {
8094
10622
  let runtime = new $dara.RuntimeOptions({ });
8095
- return await this.runTitleGenerationWithOptions(request, runtime);
10623
+ return await this.runWriteToneGenerationWithOptions(request, runtime);
8096
10624
  }
8097
10625
 
8098
10626
  /**
8099
- * AI妙笔-创作-中英文翻译
10627
+ * 直接写作
8100
10628
  *
8101
- * @param tmpReq - RunTranslateGenerationRequest
10629
+ * @param tmpReq - RunWritingRequest
8102
10630
  * @param runtime - runtime options for this request RuntimeOptions
8103
- * @returns RunTranslateGenerationResponse
10631
+ * @returns RunWritingResponse
8104
10632
  */
8105
- async runTranslateGenerationWithOptions(tmpReq: $_model.RunTranslateGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunTranslateGenerationResponse> {
10633
+ async *runWritingWithSSE(tmpReq: $_model.RunWritingRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWritingResponse, any, unknown> {
8106
10634
  tmpReq.validate();
8107
- let request = new $_model.RunTranslateGenerationShrinkRequest({ });
10635
+ let request = new $_model.RunWritingShrinkRequest({ });
8108
10636
  OpenApiUtil.convert(tmpReq, request);
8109
10637
  if (!$dara.isNull(tmpReq.referenceData)) {
8110
10638
  request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
8111
10639
  }
8112
10640
 
10641
+ if (!$dara.isNull(tmpReq.writingConfig)) {
10642
+ request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
10643
+ }
10644
+
8113
10645
  let body : {[key: string ]: any} = { };
10646
+ if (!$dara.isNull(request.originSessionId)) {
10647
+ body["OriginSessionId"] = request.originSessionId;
10648
+ }
10649
+
8114
10650
  if (!$dara.isNull(request.prompt)) {
8115
10651
  body["Prompt"] = request.prompt;
8116
10652
  }
@@ -8119,6 +10655,10 @@ export default class Client extends OpenApi {
8119
10655
  body["ReferenceData"] = request.referenceDataShrink;
8120
10656
  }
8121
10657
 
10658
+ if (!$dara.isNull(request.sessionId)) {
10659
+ body["SessionId"] = request.sessionId;
10660
+ }
10661
+
8122
10662
  if (!$dara.isNull(request.taskId)) {
8123
10663
  body["TaskId"] = request.taskId;
8124
10664
  }
@@ -8127,11 +10667,15 @@ export default class Client extends OpenApi {
8127
10667
  body["WorkspaceId"] = request.workspaceId;
8128
10668
  }
8129
10669
 
10670
+ if (!$dara.isNull(request.writingConfigShrink)) {
10671
+ body["WritingConfig"] = request.writingConfigShrink;
10672
+ }
10673
+
8130
10674
  let req = new $OpenApiUtil.OpenApiRequest({
8131
10675
  body: OpenApiUtil.parseToMap(body),
8132
10676
  });
8133
10677
  let params = new $OpenApiUtil.Params({
8134
- action: "RunTranslateGeneration",
10678
+ action: "RunWriting",
8135
10679
  version: "2023-08-01",
8136
10680
  protocol: "HTTPS",
8137
10681
  pathname: "/",
@@ -8141,36 +10685,46 @@ export default class Client extends OpenApi {
8141
10685
  reqBodyType: "formData",
8142
10686
  bodyType: "json",
8143
10687
  });
8144
- return $dara.cast<$_model.RunTranslateGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunTranslateGenerationResponse({}));
8145
- }
10688
+ let sseResp = await this.callSSEApi(params, req, runtime);
8146
10689
 
8147
- /**
8148
- * AI妙笔-创作-中英文翻译
8149
- *
8150
- * @param request - RunTranslateGenerationRequest
8151
- * @returns RunTranslateGenerationResponse
8152
- */
8153
- async runTranslateGeneration(request: $_model.RunTranslateGenerationRequest): Promise<$_model.RunTranslateGenerationResponse> {
8154
- let runtime = new $dara.RuntimeOptions({ });
8155
- return await this.runTranslateGenerationWithOptions(request, runtime);
10690
+ for await (let resp of sseResp) {
10691
+ let data = JSON.parse(resp.event.data);
10692
+ yield $dara.cast<$_model.RunWritingResponse>({
10693
+ statusCode: resp.statusCode,
10694
+ headers: resp.headers,
10695
+ body: {
10696
+ ...data,
10697
+ RequestId: resp.event.id,
10698
+ Message: resp.event.event,
10699
+ },
10700
+ }, new $_model.RunWritingResponse({}));
10701
+ }
8156
10702
  }
8157
10703
 
8158
10704
  /**
8159
- * AI妙笔-创作-文风改写
10705
+ * 直接写作
8160
10706
  *
8161
- * @param tmpReq - RunWriteToneGenerationRequest
10707
+ * @param tmpReq - RunWritingRequest
8162
10708
  * @param runtime - runtime options for this request RuntimeOptions
8163
- * @returns RunWriteToneGenerationResponse
10709
+ * @returns RunWritingResponse
8164
10710
  */
8165
- async runWriteToneGenerationWithOptions(tmpReq: $_model.RunWriteToneGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunWriteToneGenerationResponse> {
10711
+ async runWritingWithOptions(tmpReq: $_model.RunWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunWritingResponse> {
8166
10712
  tmpReq.validate();
8167
- let request = new $_model.RunWriteToneGenerationShrinkRequest({ });
10713
+ let request = new $_model.RunWritingShrinkRequest({ });
8168
10714
  OpenApiUtil.convert(tmpReq, request);
8169
10715
  if (!$dara.isNull(tmpReq.referenceData)) {
8170
10716
  request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
8171
10717
  }
8172
10718
 
10719
+ if (!$dara.isNull(tmpReq.writingConfig)) {
10720
+ request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
10721
+ }
10722
+
8173
10723
  let body : {[key: string ]: any} = { };
10724
+ if (!$dara.isNull(request.originSessionId)) {
10725
+ body["OriginSessionId"] = request.originSessionId;
10726
+ }
10727
+
8174
10728
  if (!$dara.isNull(request.prompt)) {
8175
10729
  body["Prompt"] = request.prompt;
8176
10730
  }
@@ -8179,6 +10733,10 @@ export default class Client extends OpenApi {
8179
10733
  body["ReferenceData"] = request.referenceDataShrink;
8180
10734
  }
8181
10735
 
10736
+ if (!$dara.isNull(request.sessionId)) {
10737
+ body["SessionId"] = request.sessionId;
10738
+ }
10739
+
8182
10740
  if (!$dara.isNull(request.taskId)) {
8183
10741
  body["TaskId"] = request.taskId;
8184
10742
  }
@@ -8187,11 +10745,15 @@ export default class Client extends OpenApi {
8187
10745
  body["WorkspaceId"] = request.workspaceId;
8188
10746
  }
8189
10747
 
10748
+ if (!$dara.isNull(request.writingConfigShrink)) {
10749
+ body["WritingConfig"] = request.writingConfigShrink;
10750
+ }
10751
+
8190
10752
  let req = new $OpenApiUtil.OpenApiRequest({
8191
10753
  body: OpenApiUtil.parseToMap(body),
8192
10754
  });
8193
10755
  let params = new $OpenApiUtil.Params({
8194
- action: "RunWriteToneGeneration",
10756
+ action: "RunWriting",
8195
10757
  version: "2023-08-01",
8196
10758
  protocol: "HTTPS",
8197
10759
  pathname: "/",
@@ -8201,73 +10763,145 @@ export default class Client extends OpenApi {
8201
10763
  reqBodyType: "formData",
8202
10764
  bodyType: "json",
8203
10765
  });
8204
- return $dara.cast<$_model.RunWriteToneGenerationResponse>(await this.callApi(params, req, runtime), new $_model.RunWriteToneGenerationResponse({}));
10766
+ return $dara.cast<$_model.RunWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunWritingResponse({}));
8205
10767
  }
8206
10768
 
8207
10769
  /**
8208
- * AI妙笔-创作-文风改写
10770
+ * 直接写作
8209
10771
  *
8210
- * @param request - RunWriteToneGenerationRequest
8211
- * @returns RunWriteToneGenerationResponse
10772
+ * @param request - RunWritingRequest
10773
+ * @returns RunWritingResponse
8212
10774
  */
8213
- async runWriteToneGeneration(request: $_model.RunWriteToneGenerationRequest): Promise<$_model.RunWriteToneGenerationResponse> {
10775
+ async runWriting(request: $_model.RunWritingRequest): Promise<$_model.RunWritingResponse> {
8214
10776
  let runtime = new $dara.RuntimeOptions({ });
8215
- return await this.runWriteToneGenerationWithOptions(request, runtime);
10777
+ return await this.runWritingWithOptions(request, runtime);
8216
10778
  }
8217
10779
 
8218
10780
  /**
8219
10781
  * 直接写作
8220
10782
  *
8221
- * @param tmpReq - RunWritingRequest
10783
+ * @param tmpReq - RunWritingV2Request
8222
10784
  * @param runtime - runtime options for this request RuntimeOptions
8223
- * @returns RunWritingResponse
10785
+ * @returns RunWritingV2Response
8224
10786
  */
8225
- async runWritingWithOptions(tmpReq: $_model.RunWritingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunWritingResponse> {
10787
+ async *runWritingV2WithSSE(tmpReq: $_model.RunWritingV2Request, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunWritingV2Response, any, unknown> {
8226
10788
  tmpReq.validate();
8227
- let request = new $_model.RunWritingShrinkRequest({ });
10789
+ let request = new $_model.RunWritingV2ShrinkRequest({ });
8228
10790
  OpenApiUtil.convert(tmpReq, request);
8229
- if (!$dara.isNull(tmpReq.referenceData)) {
8230
- request.referenceDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceData, "ReferenceData", "json");
10791
+ if (!$dara.isNull(tmpReq.articles)) {
10792
+ request.articlesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.articles, "Articles", "json");
8231
10793
  }
8232
10794
 
8233
- if (!$dara.isNull(tmpReq.writingConfig)) {
8234
- request.writingConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingConfig, "WritingConfig", "json");
10795
+ if (!$dara.isNull(tmpReq.keywords)) {
10796
+ request.keywordsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.keywords, "Keywords", "json");
10797
+ }
10798
+
10799
+ if (!$dara.isNull(tmpReq.miniDocs)) {
10800
+ request.miniDocsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.miniDocs, "MiniDocs", "json");
10801
+ }
10802
+
10803
+ if (!$dara.isNull(tmpReq.outlines)) {
10804
+ request.outlinesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.outlines, "Outlines", "json");
10805
+ }
10806
+
10807
+ if (!$dara.isNull(tmpReq.searchSources)) {
10808
+ request.searchSourcesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.searchSources, "SearchSources", "json");
10809
+ }
10810
+
10811
+ if (!$dara.isNull(tmpReq.summarization)) {
10812
+ request.summarizationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.summarization, "Summarization", "json");
10813
+ }
10814
+
10815
+ if (!$dara.isNull(tmpReq.writingParams)) {
10816
+ request.writingParamsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.writingParams, "WritingParams", "json");
8235
10817
  }
8236
10818
 
8237
10819
  let body : {[key: string ]: any} = { };
8238
- if (!$dara.isNull(request.originSessionId)) {
8239
- body["OriginSessionId"] = request.originSessionId;
10820
+ if (!$dara.isNull(request.articlesShrink)) {
10821
+ body["Articles"] = request.articlesShrink;
10822
+ }
10823
+
10824
+ if (!$dara.isNull(request.distributeWriting)) {
10825
+ body["DistributeWriting"] = request.distributeWriting;
10826
+ }
10827
+
10828
+ if (!$dara.isNull(request.gcNumberSize)) {
10829
+ body["GcNumberSize"] = request.gcNumberSize;
10830
+ }
10831
+
10832
+ if (!$dara.isNull(request.gcNumberSizeTag)) {
10833
+ body["GcNumberSizeTag"] = request.gcNumberSizeTag;
10834
+ }
10835
+
10836
+ if (!$dara.isNull(request.keywordsShrink)) {
10837
+ body["Keywords"] = request.keywordsShrink;
10838
+ }
10839
+
10840
+ if (!$dara.isNull(request.language)) {
10841
+ body["Language"] = request.language;
10842
+ }
10843
+
10844
+ if (!$dara.isNull(request.miniDocsShrink)) {
10845
+ body["MiniDocs"] = request.miniDocsShrink;
10846
+ }
10847
+
10848
+ if (!$dara.isNull(request.outlinesShrink)) {
10849
+ body["Outlines"] = request.outlinesShrink;
8240
10850
  }
8241
10851
 
8242
10852
  if (!$dara.isNull(request.prompt)) {
8243
10853
  body["Prompt"] = request.prompt;
8244
10854
  }
8245
10855
 
8246
- if (!$dara.isNull(request.referenceDataShrink)) {
8247
- body["ReferenceData"] = request.referenceDataShrink;
10856
+ if (!$dara.isNull(request.promptMode)) {
10857
+ body["PromptMode"] = request.promptMode;
10858
+ }
10859
+
10860
+ if (!$dara.isNull(request.searchSourcesShrink)) {
10861
+ body["SearchSources"] = request.searchSourcesShrink;
8248
10862
  }
8249
10863
 
8250
10864
  if (!$dara.isNull(request.sessionId)) {
8251
10865
  body["SessionId"] = request.sessionId;
8252
10866
  }
8253
10867
 
10868
+ if (!$dara.isNull(request.step)) {
10869
+ body["Step"] = request.step;
10870
+ }
10871
+
10872
+ if (!$dara.isNull(request.summarizationShrink)) {
10873
+ body["Summarization"] = request.summarizationShrink;
10874
+ }
10875
+
8254
10876
  if (!$dara.isNull(request.taskId)) {
8255
10877
  body["TaskId"] = request.taskId;
8256
10878
  }
8257
10879
 
10880
+ if (!$dara.isNull(request.useSearch)) {
10881
+ body["UseSearch"] = request.useSearch;
10882
+ }
10883
+
8258
10884
  if (!$dara.isNull(request.workspaceId)) {
8259
10885
  body["WorkspaceId"] = request.workspaceId;
8260
10886
  }
8261
10887
 
8262
- if (!$dara.isNull(request.writingConfigShrink)) {
8263
- body["WritingConfig"] = request.writingConfigShrink;
10888
+ if (!$dara.isNull(request.writingParamsShrink)) {
10889
+ body["WritingParams"] = request.writingParamsShrink;
10890
+ }
10891
+
10892
+ if (!$dara.isNull(request.writingScene)) {
10893
+ body["WritingScene"] = request.writingScene;
10894
+ }
10895
+
10896
+ if (!$dara.isNull(request.writingStyle)) {
10897
+ body["WritingStyle"] = request.writingStyle;
8264
10898
  }
8265
10899
 
8266
10900
  let req = new $OpenApiUtil.OpenApiRequest({
8267
10901
  body: OpenApiUtil.parseToMap(body),
8268
10902
  });
8269
10903
  let params = new $OpenApiUtil.Params({
8270
- action: "RunWriting",
10904
+ action: "RunWritingV2",
8271
10905
  version: "2023-08-01",
8272
10906
  protocol: "HTTPS",
8273
10907
  pathname: "/",
@@ -8277,18 +10911,20 @@ export default class Client extends OpenApi {
8277
10911
  reqBodyType: "formData",
8278
10912
  bodyType: "json",
8279
10913
  });
8280
- return $dara.cast<$_model.RunWritingResponse>(await this.callApi(params, req, runtime), new $_model.RunWritingResponse({}));
8281
- }
10914
+ let sseResp = await this.callSSEApi(params, req, runtime);
8282
10915
 
8283
- /**
8284
- * 直接写作
8285
- *
8286
- * @param request - RunWritingRequest
8287
- * @returns RunWritingResponse
8288
- */
8289
- async runWriting(request: $_model.RunWritingRequest): Promise<$_model.RunWritingResponse> {
8290
- let runtime = new $dara.RuntimeOptions({ });
8291
- return await this.runWritingWithOptions(request, runtime);
10916
+ for await (let resp of sseResp) {
10917
+ let data = JSON.parse(resp.event.data);
10918
+ yield $dara.cast<$_model.RunWritingV2Response>({
10919
+ statusCode: resp.statusCode,
10920
+ headers: resp.headers,
10921
+ body: {
10922
+ ...data,
10923
+ RequestId: resp.event.id,
10924
+ Message: resp.event.event,
10925
+ },
10926
+ }, new $_model.RunWritingV2Response({}));
10927
+ }
8292
10928
  }
8293
10929
 
8294
10930
  /**
@@ -9237,6 +11873,76 @@ export default class Client extends OpenApi {
9237
11873
  return await this.submitCustomTopicSelectionPerspectiveAnalysisTaskWithOptions(request, runtime);
9238
11874
  }
9239
11875
 
11876
+ /**
11877
+ * 提交深度写作任务
11878
+ *
11879
+ * @param tmpReq - SubmitDeepWriteTaskRequest
11880
+ * @param runtime - runtime options for this request RuntimeOptions
11881
+ * @returns SubmitDeepWriteTaskResponse
11882
+ */
11883
+ async submitDeepWriteTaskWithOptions(tmpReq: $_model.SubmitDeepWriteTaskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.SubmitDeepWriteTaskResponse> {
11884
+ tmpReq.validate();
11885
+ let request = new $_model.SubmitDeepWriteTaskShrinkRequest({ });
11886
+ OpenApiUtil.convert(tmpReq, request);
11887
+ if (!$dara.isNull(tmpReq.agentOrchestration)) {
11888
+ request.agentOrchestrationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentOrchestration, "AgentOrchestration", "json");
11889
+ }
11890
+
11891
+ if (!$dara.isNull(tmpReq.files)) {
11892
+ request.filesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.files, "Files", "json");
11893
+ }
11894
+
11895
+ let query = { };
11896
+ if (!$dara.isNull(request.agentOrchestrationShrink)) {
11897
+ query["AgentOrchestration"] = request.agentOrchestrationShrink;
11898
+ }
11899
+
11900
+ let body : {[key: string ]: any} = { };
11901
+ if (!$dara.isNull(request.filesShrink)) {
11902
+ body["Files"] = request.filesShrink;
11903
+ }
11904
+
11905
+ if (!$dara.isNull(request.input)) {
11906
+ body["Input"] = request.input;
11907
+ }
11908
+
11909
+ if (!$dara.isNull(request.instructions)) {
11910
+ body["Instructions"] = request.instructions;
11911
+ }
11912
+
11913
+ if (!$dara.isNull(request.workspaceId)) {
11914
+ body["WorkspaceId"] = request.workspaceId;
11915
+ }
11916
+
11917
+ let req = new $OpenApiUtil.OpenApiRequest({
11918
+ query: OpenApiUtil.query(query),
11919
+ body: OpenApiUtil.parseToMap(body),
11920
+ });
11921
+ let params = new $OpenApiUtil.Params({
11922
+ action: "SubmitDeepWriteTask",
11923
+ version: "2023-08-01",
11924
+ protocol: "HTTPS",
11925
+ pathname: "/",
11926
+ method: "POST",
11927
+ authType: "AK",
11928
+ style: "RPC",
11929
+ reqBodyType: "formData",
11930
+ bodyType: "json",
11931
+ });
11932
+ return $dara.cast<$_model.SubmitDeepWriteTaskResponse>(await this.callApi(params, req, runtime), new $_model.SubmitDeepWriteTaskResponse({}));
11933
+ }
11934
+
11935
+ /**
11936
+ * 提交深度写作任务
11937
+ *
11938
+ * @param request - SubmitDeepWriteTaskRequest
11939
+ * @returns SubmitDeepWriteTaskResponse
11940
+ */
11941
+ async submitDeepWriteTask(request: $_model.SubmitDeepWriteTaskRequest): Promise<$_model.SubmitDeepWriteTaskResponse> {
11942
+ let runtime = new $dara.RuntimeOptions({ });
11943
+ return await this.submitDeepWriteTaskWithOptions(request, runtime);
11944
+ }
11945
+
9240
11946
  /**
9241
11947
  * 提交文档聚合任务
9242
11948
  *
@@ -9441,6 +12147,52 @@ export default class Client extends OpenApi {
9441
12147
  return await this.submitExportTermsTaskWithOptions(request, runtime);
9442
12148
  }
9443
12149
 
12150
+ /**
12151
+ * 妙笔为您提供了新的事实性审核能力,在联网搜索并判断正误的前提下,还支持用户自定义配置搜索来源 URL。
12152
+ *
12153
+ * @param request - SubmitFactAuditUrlRequest
12154
+ * @param runtime - runtime options for this request RuntimeOptions
12155
+ * @returns SubmitFactAuditUrlResponse
12156
+ */
12157
+ async submitFactAuditUrlWithOptions(request: $_model.SubmitFactAuditUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.SubmitFactAuditUrlResponse> {
12158
+ request.validate();
12159
+ let body : {[key: string ]: any} = { };
12160
+ if (!$dara.isNull(request.url)) {
12161
+ body["Url"] = request.url;
12162
+ }
12163
+
12164
+ if (!$dara.isNull(request.workspaceId)) {
12165
+ body["WorkspaceId"] = request.workspaceId;
12166
+ }
12167
+
12168
+ let req = new $OpenApiUtil.OpenApiRequest({
12169
+ body: OpenApiUtil.parseToMap(body),
12170
+ });
12171
+ let params = new $OpenApiUtil.Params({
12172
+ action: "SubmitFactAuditUrl",
12173
+ version: "2023-08-01",
12174
+ protocol: "HTTPS",
12175
+ pathname: "/",
12176
+ method: "POST",
12177
+ authType: "AK",
12178
+ style: "RPC",
12179
+ reqBodyType: "formData",
12180
+ bodyType: "json",
12181
+ });
12182
+ return $dara.cast<$_model.SubmitFactAuditUrlResponse>(await this.callApi(params, req, runtime), new $_model.SubmitFactAuditUrlResponse({}));
12183
+ }
12184
+
12185
+ /**
12186
+ * 妙笔为您提供了新的事实性审核能力,在联网搜索并判断正误的前提下,还支持用户自定义配置搜索来源 URL。
12187
+ *
12188
+ * @param request - SubmitFactAuditUrlRequest
12189
+ * @returns SubmitFactAuditUrlResponse
12190
+ */
12191
+ async submitFactAuditUrl(request: $_model.SubmitFactAuditUrlRequest): Promise<$_model.SubmitFactAuditUrlResponse> {
12192
+ let runtime = new $dara.RuntimeOptions({ });
12193
+ return await this.submitFactAuditUrlWithOptions(request, runtime);
12194
+ }
12195
+
9444
12196
  /**
9445
12197
  * 提交导入自定义词库任务
9446
12198
  *