@alicloud/quanmiaolightapp20240801 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/client.ts CHANGED
@@ -335,6 +335,51 @@ export default class Client extends OpenApi {
335
335
  return await this.getEssayCorrectionTaskWithOptions(workspaceId, request, headers, runtime);
336
336
  }
337
337
 
338
+ /**
339
+ * 获取文件内容
340
+ *
341
+ * @param request - GetFileContentRequest
342
+ * @param headers - map
343
+ * @param runtime - runtime options for this request RuntimeOptions
344
+ * @returns GetFileContentResponse
345
+ */
346
+ async getFileContentWithOptions(workspaceId: string, request: $_model.GetFileContentRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetFileContentResponse> {
347
+ request.validate();
348
+ let body : {[key: string ]: any} = { };
349
+ if (!$dara.isNull(request.fileKey)) {
350
+ body["fileKey"] = request.fileKey;
351
+ }
352
+
353
+ let req = new $OpenApiUtil.OpenApiRequest({
354
+ headers: headers,
355
+ body: OpenApiUtil.parseToMap(body),
356
+ });
357
+ let params = new $OpenApiUtil.Params({
358
+ action: "GetFileContent",
359
+ version: "2024-08-01",
360
+ protocol: "HTTPS",
361
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/getFileContent`,
362
+ method: "POST",
363
+ authType: "AK",
364
+ style: "ROA",
365
+ reqBodyType: "formData",
366
+ bodyType: "json",
367
+ });
368
+ return $dara.cast<$_model.GetFileContentResponse>(await this.callApi(params, req, runtime), new $_model.GetFileContentResponse({}));
369
+ }
370
+
371
+ /**
372
+ * 获取文件内容
373
+ *
374
+ * @param request - GetFileContentRequest
375
+ * @returns GetFileContentResponse
376
+ */
377
+ async getFileContent(workspaceId: string, request: $_model.GetFileContentRequest): Promise<$_model.GetFileContentResponse> {
378
+ let runtime = new $dara.RuntimeOptions({ });
379
+ let headers : {[key: string ]: string} = { };
380
+ return await this.getFileContentWithOptions(workspaceId, request, headers, runtime);
381
+ }
382
+
338
383
  /**
339
384
  * 获取挖掘分析任务结果
340
385
  *
@@ -619,6 +664,98 @@ export default class Client extends OpenApi {
619
664
  return await this.listHotTopicSummariesWithOptions(workspaceId, request, headers, runtime);
620
665
  }
621
666
 
667
+ /**
668
+ * 企业VOC分析
669
+ *
670
+ * @param tmpReq - RunEnterpriseVocAnalysisRequest
671
+ * @param headers - map
672
+ * @param runtime - runtime options for this request RuntimeOptions
673
+ * @returns RunEnterpriseVocAnalysisResponse
674
+ */
675
+ async *runEnterpriseVocAnalysisWithSSE(workspaceId: string, tmpReq: $_model.RunEnterpriseVocAnalysisRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunEnterpriseVocAnalysisResponse, any, unknown> {
676
+ tmpReq.validate();
677
+ let request = new $_model.RunEnterpriseVocAnalysisShrinkRequest({ });
678
+ OpenApiUtil.convert(tmpReq, request);
679
+ if (!$dara.isNull(tmpReq.filterTags)) {
680
+ request.filterTagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.filterTags, "filterTags", "json");
681
+ }
682
+
683
+ if (!$dara.isNull(tmpReq.tags)) {
684
+ request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
685
+ }
686
+
687
+ let body : {[key: string ]: any} = { };
688
+ if (!$dara.isNull(request.akProxy)) {
689
+ body["akProxy"] = request.akProxy;
690
+ }
691
+
692
+ if (!$dara.isNull(request.apiKey)) {
693
+ body["apiKey"] = request.apiKey;
694
+ }
695
+
696
+ if (!$dara.isNull(request.content)) {
697
+ body["content"] = request.content;
698
+ }
699
+
700
+ if (!$dara.isNull(request.extraInfo)) {
701
+ body["extraInfo"] = request.extraInfo;
702
+ }
703
+
704
+ if (!$dara.isNull(request.filterTagsShrink)) {
705
+ body["filterTags"] = request.filterTagsShrink;
706
+ }
707
+
708
+ if (!$dara.isNull(request.modelId)) {
709
+ body["modelId"] = request.modelId;
710
+ }
711
+
712
+ if (!$dara.isNull(request.outputFormat)) {
713
+ body["outputFormat"] = request.outputFormat;
714
+ }
715
+
716
+ if (!$dara.isNull(request.sourceTrace)) {
717
+ body["sourceTrace"] = request.sourceTrace;
718
+ }
719
+
720
+ if (!$dara.isNull(request.tagsShrink)) {
721
+ body["tags"] = request.tagsShrink;
722
+ }
723
+
724
+ if (!$dara.isNull(request.taskDescription)) {
725
+ body["taskDescription"] = request.taskDescription;
726
+ }
727
+
728
+ let req = new $OpenApiUtil.OpenApiRequest({
729
+ headers: headers,
730
+ body: OpenApiUtil.parseToMap(body),
731
+ });
732
+ let params = new $OpenApiUtil.Params({
733
+ action: "RunEnterpriseVocAnalysis",
734
+ version: "2024-08-01",
735
+ protocol: "HTTPS",
736
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runEnterpriseVocAnalysis`,
737
+ method: "POST",
738
+ authType: "AK",
739
+ style: "ROA",
740
+ reqBodyType: "formData",
741
+ bodyType: "json",
742
+ });
743
+ let sseResp = await this.callSSEApi(params, req, runtime);
744
+
745
+ for await (let resp of sseResp) {
746
+ let data = JSON.parse(resp.event.data);
747
+ yield $dara.cast<$_model.RunEnterpriseVocAnalysisResponse>({
748
+ statusCode: resp.statusCode,
749
+ headers: resp.headers,
750
+ body: {
751
+ ...data,
752
+ RequestId: resp.event.id,
753
+ Message: resp.event.event,
754
+ },
755
+ }, new $_model.RunEnterpriseVocAnalysisResponse({}));
756
+ }
757
+ }
758
+
622
759
  /**
623
760
  * 企业VOC分析
624
761
  *
@@ -710,6 +847,76 @@ export default class Client extends OpenApi {
710
847
  return await this.runEnterpriseVocAnalysisWithOptions(workspaceId, request, headers, runtime);
711
848
  }
712
849
 
850
+ /**
851
+ * 作业批改
852
+ *
853
+ * @param request - RunEssayCorrectionRequest
854
+ * @param headers - map
855
+ * @param runtime - runtime options for this request RuntimeOptions
856
+ * @returns RunEssayCorrectionResponse
857
+ */
858
+ async *runEssayCorrectionWithSSE(workspaceId: string, request: $_model.RunEssayCorrectionRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunEssayCorrectionResponse, any, unknown> {
859
+ request.validate();
860
+ let body : {[key: string ]: any} = { };
861
+ if (!$dara.isNull(request.answer)) {
862
+ body["answer"] = request.answer;
863
+ }
864
+
865
+ if (!$dara.isNull(request.grade)) {
866
+ body["grade"] = request.grade;
867
+ }
868
+
869
+ if (!$dara.isNull(request.modelId)) {
870
+ body["modelId"] = request.modelId;
871
+ }
872
+
873
+ if (!$dara.isNull(request.otherReviewPoints)) {
874
+ body["otherReviewPoints"] = request.otherReviewPoints;
875
+ }
876
+
877
+ if (!$dara.isNull(request.question)) {
878
+ body["question"] = request.question;
879
+ }
880
+
881
+ if (!$dara.isNull(request.subject)) {
882
+ body["subject"] = request.subject;
883
+ }
884
+
885
+ if (!$dara.isNull(request.totalScore)) {
886
+ body["totalScore"] = request.totalScore;
887
+ }
888
+
889
+ let req = new $OpenApiUtil.OpenApiRequest({
890
+ headers: headers,
891
+ body: OpenApiUtil.parseToMap(body),
892
+ });
893
+ let params = new $OpenApiUtil.Params({
894
+ action: "RunEssayCorrection",
895
+ version: "2024-08-01",
896
+ protocol: "HTTPS",
897
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runEssayCorrection`,
898
+ method: "POST",
899
+ authType: "AK",
900
+ style: "ROA",
901
+ reqBodyType: "formData",
902
+ bodyType: "json",
903
+ });
904
+ let sseResp = await this.callSSEApi(params, req, runtime);
905
+
906
+ for await (let resp of sseResp) {
907
+ let data = JSON.parse(resp.event.data);
908
+ yield $dara.cast<$_model.RunEssayCorrectionResponse>({
909
+ statusCode: resp.statusCode,
910
+ headers: resp.headers,
911
+ body: {
912
+ ...data,
913
+ RequestId: resp.event.id,
914
+ Message: resp.event.event,
915
+ },
916
+ }, new $_model.RunEssayCorrectionResponse({}));
917
+ }
918
+ }
919
+
713
920
  /**
714
921
  * 作业批改
715
922
  *
@@ -787,7 +994,7 @@ export default class Client extends OpenApi {
787
994
  * @param runtime - runtime options for this request RuntimeOptions
788
995
  * @returns RunHotTopicChatResponse
789
996
  */
790
- async runHotTopicChatWithOptions(workspaceId: string, tmpReq: $_model.RunHotTopicChatRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotTopicChatResponse> {
997
+ async *runHotTopicChatWithSSE(workspaceId: string, tmpReq: $_model.RunHotTopicChatRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunHotTopicChatResponse, any, unknown> {
791
998
  tmpReq.validate();
792
999
  let request = new $_model.RunHotTopicChatShrinkRequest({ });
793
1000
  OpenApiUtil.convert(tmpReq, request);
@@ -871,52 +1078,97 @@ export default class Client extends OpenApi {
871
1078
  reqBodyType: "formData",
872
1079
  bodyType: "json",
873
1080
  });
874
- return $dara.cast<$_model.RunHotTopicChatResponse>(await this.callApi(params, req, runtime), new $_model.RunHotTopicChatResponse({}));
875
- }
1081
+ let sseResp = await this.callSSEApi(params, req, runtime);
876
1082
 
877
- /**
878
- * 轻应用-热点播报-问答
879
- *
880
- * @param request - RunHotTopicChatRequest
881
- * @returns RunHotTopicChatResponse
882
- */
883
- async runHotTopicChat(workspaceId: string, request: $_model.RunHotTopicChatRequest): Promise<$_model.RunHotTopicChatResponse> {
884
- let runtime = new $dara.RuntimeOptions({ });
885
- let headers : {[key: string ]: string} = { };
886
- return await this.runHotTopicChatWithOptions(workspaceId, request, headers, runtime);
1083
+ for await (let resp of sseResp) {
1084
+ let data = JSON.parse(resp.event.data);
1085
+ yield $dara.cast<$_model.RunHotTopicChatResponse>({
1086
+ statusCode: resp.statusCode,
1087
+ headers: resp.headers,
1088
+ body: {
1089
+ ...data,
1090
+ RequestId: resp.event.id,
1091
+ Message: resp.event.event,
1092
+ },
1093
+ }, new $_model.RunHotTopicChatResponse({}));
1094
+ }
887
1095
  }
888
1096
 
889
1097
  /**
890
- * 轻应用-热点播报-热点摘要生成
1098
+ * 轻应用-热点播报-问答
891
1099
  *
892
- * @param tmpReq - RunHotTopicSummaryRequest
1100
+ * @param tmpReq - RunHotTopicChatRequest
893
1101
  * @param headers - map
894
1102
  * @param runtime - runtime options for this request RuntimeOptions
895
- * @returns RunHotTopicSummaryResponse
1103
+ * @returns RunHotTopicChatResponse
896
1104
  */
897
- async runHotTopicSummaryWithOptions(workspaceId: string, tmpReq: $_model.RunHotTopicSummaryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotTopicSummaryResponse> {
1105
+ async runHotTopicChatWithOptions(workspaceId: string, tmpReq: $_model.RunHotTopicChatRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotTopicChatResponse> {
898
1106
  tmpReq.validate();
899
- let request = new $_model.RunHotTopicSummaryShrinkRequest({ });
1107
+ let request = new $_model.RunHotTopicChatShrinkRequest({ });
900
1108
  OpenApiUtil.convert(tmpReq, request);
901
- if (!$dara.isNull(tmpReq.stepForCustomSummaryStyleConfig)) {
902
- request.stepForCustomSummaryStyleConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.stepForCustomSummaryStyleConfig, "stepForCustomSummaryStyleConfig", "json");
1109
+ if (!$dara.isNull(tmpReq.generateOptions)) {
1110
+ request.generateOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.generateOptions, "generateOptions", "json");
903
1111
  }
904
1112
 
905
- if (!$dara.isNull(tmpReq.topicIds)) {
906
- request.topicIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.topicIds, "topicIds", "json");
1113
+ if (!$dara.isNull(tmpReq.hotTopics)) {
1114
+ request.hotTopicsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.hotTopics, "hotTopics", "json");
1115
+ }
1116
+
1117
+ if (!$dara.isNull(tmpReq.messages)) {
1118
+ request.messagesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.messages, "messages", "json");
1119
+ }
1120
+
1121
+ if (!$dara.isNull(tmpReq.stepForBroadcastContentConfig)) {
1122
+ request.stepForBroadcastContentConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.stepForBroadcastContentConfig, "stepForBroadcastContentConfig", "json");
907
1123
  }
908
1124
 
909
1125
  let body : {[key: string ]: any} = { };
1126
+ if (!$dara.isNull(request.category)) {
1127
+ body["category"] = request.category;
1128
+ }
1129
+
1130
+ if (!$dara.isNull(request.generateOptionsShrink)) {
1131
+ body["generateOptions"] = request.generateOptionsShrink;
1132
+ }
1133
+
910
1134
  if (!$dara.isNull(request.hotTopicVersion)) {
911
1135
  body["hotTopicVersion"] = request.hotTopicVersion;
912
1136
  }
913
1137
 
914
- if (!$dara.isNull(request.stepForCustomSummaryStyleConfigShrink)) {
915
- body["stepForCustomSummaryStyleConfig"] = request.stepForCustomSummaryStyleConfigShrink;
1138
+ if (!$dara.isNull(request.hotTopicsShrink)) {
1139
+ body["hotTopics"] = request.hotTopicsShrink;
916
1140
  }
917
1141
 
918
- if (!$dara.isNull(request.topicIdsShrink)) {
919
- body["topicIds"] = request.topicIdsShrink;
1142
+ if (!$dara.isNull(request.imageCount)) {
1143
+ body["imageCount"] = request.imageCount;
1144
+ }
1145
+
1146
+ if (!$dara.isNull(request.messagesShrink)) {
1147
+ body["messages"] = request.messagesShrink;
1148
+ }
1149
+
1150
+ if (!$dara.isNull(request.modelCustomPromptTemplate)) {
1151
+ body["modelCustomPromptTemplate"] = request.modelCustomPromptTemplate;
1152
+ }
1153
+
1154
+ if (!$dara.isNull(request.modelId)) {
1155
+ body["modelId"] = request.modelId;
1156
+ }
1157
+
1158
+ if (!$dara.isNull(request.originalSessionId)) {
1159
+ body["originalSessionId"] = request.originalSessionId;
1160
+ }
1161
+
1162
+ if (!$dara.isNull(request.prompt)) {
1163
+ body["prompt"] = request.prompt;
1164
+ }
1165
+
1166
+ if (!$dara.isNull(request.stepForBroadcastContentConfigShrink)) {
1167
+ body["stepForBroadcastContentConfig"] = request.stepForBroadcastContentConfigShrink;
1168
+ }
1169
+
1170
+ if (!$dara.isNull(request.taskId)) {
1171
+ body["taskId"] = request.taskId;
920
1172
  }
921
1173
 
922
1174
  let req = new $OpenApiUtil.OpenApiRequest({
@@ -924,10 +1176,137 @@ export default class Client extends OpenApi {
924
1176
  body: OpenApiUtil.parseToMap(body),
925
1177
  });
926
1178
  let params = new $OpenApiUtil.Params({
927
- action: "RunHotTopicSummary",
1179
+ action: "RunHotTopicChat",
928
1180
  version: "2024-08-01",
929
1181
  protocol: "HTTPS",
930
- pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runHotTopicSummary`,
1182
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runHotTopicChat`,
1183
+ method: "POST",
1184
+ authType: "AK",
1185
+ style: "ROA",
1186
+ reqBodyType: "formData",
1187
+ bodyType: "json",
1188
+ });
1189
+ return $dara.cast<$_model.RunHotTopicChatResponse>(await this.callApi(params, req, runtime), new $_model.RunHotTopicChatResponse({}));
1190
+ }
1191
+
1192
+ /**
1193
+ * 轻应用-热点播报-问答
1194
+ *
1195
+ * @param request - RunHotTopicChatRequest
1196
+ * @returns RunHotTopicChatResponse
1197
+ */
1198
+ async runHotTopicChat(workspaceId: string, request: $_model.RunHotTopicChatRequest): Promise<$_model.RunHotTopicChatResponse> {
1199
+ let runtime = new $dara.RuntimeOptions({ });
1200
+ let headers : {[key: string ]: string} = { };
1201
+ return await this.runHotTopicChatWithOptions(workspaceId, request, headers, runtime);
1202
+ }
1203
+
1204
+ /**
1205
+ * 轻应用-热点播报-热点摘要生成
1206
+ *
1207
+ * @param tmpReq - RunHotTopicSummaryRequest
1208
+ * @param headers - map
1209
+ * @param runtime - runtime options for this request RuntimeOptions
1210
+ * @returns RunHotTopicSummaryResponse
1211
+ */
1212
+ async *runHotTopicSummaryWithSSE(workspaceId: string, tmpReq: $_model.RunHotTopicSummaryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunHotTopicSummaryResponse, any, unknown> {
1213
+ tmpReq.validate();
1214
+ let request = new $_model.RunHotTopicSummaryShrinkRequest({ });
1215
+ OpenApiUtil.convert(tmpReq, request);
1216
+ if (!$dara.isNull(tmpReq.stepForCustomSummaryStyleConfig)) {
1217
+ request.stepForCustomSummaryStyleConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.stepForCustomSummaryStyleConfig, "stepForCustomSummaryStyleConfig", "json");
1218
+ }
1219
+
1220
+ if (!$dara.isNull(tmpReq.topicIds)) {
1221
+ request.topicIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.topicIds, "topicIds", "json");
1222
+ }
1223
+
1224
+ let body : {[key: string ]: any} = { };
1225
+ if (!$dara.isNull(request.hotTopicVersion)) {
1226
+ body["hotTopicVersion"] = request.hotTopicVersion;
1227
+ }
1228
+
1229
+ if (!$dara.isNull(request.stepForCustomSummaryStyleConfigShrink)) {
1230
+ body["stepForCustomSummaryStyleConfig"] = request.stepForCustomSummaryStyleConfigShrink;
1231
+ }
1232
+
1233
+ if (!$dara.isNull(request.topicIdsShrink)) {
1234
+ body["topicIds"] = request.topicIdsShrink;
1235
+ }
1236
+
1237
+ let req = new $OpenApiUtil.OpenApiRequest({
1238
+ headers: headers,
1239
+ body: OpenApiUtil.parseToMap(body),
1240
+ });
1241
+ let params = new $OpenApiUtil.Params({
1242
+ action: "RunHotTopicSummary",
1243
+ version: "2024-08-01",
1244
+ protocol: "HTTPS",
1245
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runHotTopicSummary`,
1246
+ method: "POST",
1247
+ authType: "AK",
1248
+ style: "ROA",
1249
+ reqBodyType: "formData",
1250
+ bodyType: "json",
1251
+ });
1252
+ let sseResp = await this.callSSEApi(params, req, runtime);
1253
+
1254
+ for await (let resp of sseResp) {
1255
+ let data = JSON.parse(resp.event.data);
1256
+ yield $dara.cast<$_model.RunHotTopicSummaryResponse>({
1257
+ statusCode: resp.statusCode,
1258
+ headers: resp.headers,
1259
+ body: {
1260
+ ...data,
1261
+ RequestId: resp.event.id,
1262
+ Message: resp.event.event,
1263
+ },
1264
+ }, new $_model.RunHotTopicSummaryResponse({}));
1265
+ }
1266
+ }
1267
+
1268
+ /**
1269
+ * 轻应用-热点播报-热点摘要生成
1270
+ *
1271
+ * @param tmpReq - RunHotTopicSummaryRequest
1272
+ * @param headers - map
1273
+ * @param runtime - runtime options for this request RuntimeOptions
1274
+ * @returns RunHotTopicSummaryResponse
1275
+ */
1276
+ async runHotTopicSummaryWithOptions(workspaceId: string, tmpReq: $_model.RunHotTopicSummaryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunHotTopicSummaryResponse> {
1277
+ tmpReq.validate();
1278
+ let request = new $_model.RunHotTopicSummaryShrinkRequest({ });
1279
+ OpenApiUtil.convert(tmpReq, request);
1280
+ if (!$dara.isNull(tmpReq.stepForCustomSummaryStyleConfig)) {
1281
+ request.stepForCustomSummaryStyleConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.stepForCustomSummaryStyleConfig, "stepForCustomSummaryStyleConfig", "json");
1282
+ }
1283
+
1284
+ if (!$dara.isNull(tmpReq.topicIds)) {
1285
+ request.topicIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.topicIds, "topicIds", "json");
1286
+ }
1287
+
1288
+ let body : {[key: string ]: any} = { };
1289
+ if (!$dara.isNull(request.hotTopicVersion)) {
1290
+ body["hotTopicVersion"] = request.hotTopicVersion;
1291
+ }
1292
+
1293
+ if (!$dara.isNull(request.stepForCustomSummaryStyleConfigShrink)) {
1294
+ body["stepForCustomSummaryStyleConfig"] = request.stepForCustomSummaryStyleConfigShrink;
1295
+ }
1296
+
1297
+ if (!$dara.isNull(request.topicIdsShrink)) {
1298
+ body["topicIds"] = request.topicIdsShrink;
1299
+ }
1300
+
1301
+ let req = new $OpenApiUtil.OpenApiRequest({
1302
+ headers: headers,
1303
+ body: OpenApiUtil.parseToMap(body),
1304
+ });
1305
+ let params = new $OpenApiUtil.Params({
1306
+ action: "RunHotTopicSummary",
1307
+ version: "2024-08-01",
1308
+ protocol: "HTTPS",
1309
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runHotTopicSummary`,
931
1310
  method: "POST",
932
1311
  authType: "AK",
933
1312
  style: "ROA",
@@ -949,6 +1328,70 @@ export default class Client extends OpenApi {
949
1328
  return await this.runHotTopicSummaryWithOptions(workspaceId, request, headers, runtime);
950
1329
  }
951
1330
 
1331
+ /**
1332
+ * 营销信息抽取服务
1333
+ *
1334
+ * @param tmpReq - RunMarketingInformationExtractRequest
1335
+ * @param headers - map
1336
+ * @param runtime - runtime options for this request RuntimeOptions
1337
+ * @returns RunMarketingInformationExtractResponse
1338
+ */
1339
+ async *runMarketingInformationExtractWithSSE(workspaceId: string, tmpReq: $_model.RunMarketingInformationExtractRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunMarketingInformationExtractResponse, any, unknown> {
1340
+ tmpReq.validate();
1341
+ let request = new $_model.RunMarketingInformationExtractShrinkRequest({ });
1342
+ OpenApiUtil.convert(tmpReq, request);
1343
+ if (!$dara.isNull(tmpReq.sourceMaterials)) {
1344
+ request.sourceMaterialsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sourceMaterials, "sourceMaterials", "json");
1345
+ }
1346
+
1347
+ let body : {[key: string ]: any} = { };
1348
+ if (!$dara.isNull(request.customPrompt)) {
1349
+ body["customPrompt"] = request.customPrompt;
1350
+ }
1351
+
1352
+ if (!$dara.isNull(request.extractType)) {
1353
+ body["extractType"] = request.extractType;
1354
+ }
1355
+
1356
+ if (!$dara.isNull(request.modelId)) {
1357
+ body["modelId"] = request.modelId;
1358
+ }
1359
+
1360
+ if (!$dara.isNull(request.sourceMaterialsShrink)) {
1361
+ body["sourceMaterials"] = request.sourceMaterialsShrink;
1362
+ }
1363
+
1364
+ let req = new $OpenApiUtil.OpenApiRequest({
1365
+ headers: headers,
1366
+ body: OpenApiUtil.parseToMap(body),
1367
+ });
1368
+ let params = new $OpenApiUtil.Params({
1369
+ action: "RunMarketingInformationExtract",
1370
+ version: "2024-08-01",
1371
+ protocol: "HTTPS",
1372
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runMarketingInformationExtract`,
1373
+ method: "POST",
1374
+ authType: "AK",
1375
+ style: "ROA",
1376
+ reqBodyType: "formData",
1377
+ bodyType: "json",
1378
+ });
1379
+ let sseResp = await this.callSSEApi(params, req, runtime);
1380
+
1381
+ for await (let resp of sseResp) {
1382
+ let data = JSON.parse(resp.event.data);
1383
+ yield $dara.cast<$_model.RunMarketingInformationExtractResponse>({
1384
+ statusCode: resp.statusCode,
1385
+ headers: resp.headers,
1386
+ body: {
1387
+ ...data,
1388
+ RequestId: resp.event.id,
1389
+ Message: resp.event.event,
1390
+ },
1391
+ }, new $_model.RunMarketingInformationExtractResponse({}));
1392
+ }
1393
+ }
1394
+
952
1395
  /**
953
1396
  * 营销信息抽取服务
954
1397
  *
@@ -1012,6 +1455,80 @@ export default class Client extends OpenApi {
1012
1455
  return await this.runMarketingInformationExtractWithOptions(workspaceId, request, headers, runtime);
1013
1456
  }
1014
1457
 
1458
+ /**
1459
+ * 营销文案写作服务
1460
+ *
1461
+ * @param request - RunMarketingInformationWritingRequest
1462
+ * @param headers - map
1463
+ * @param runtime - runtime options for this request RuntimeOptions
1464
+ * @returns RunMarketingInformationWritingResponse
1465
+ */
1466
+ async *runMarketingInformationWritingWithSSE(workspaceId: string, request: $_model.RunMarketingInformationWritingRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunMarketingInformationWritingResponse, any, unknown> {
1467
+ request.validate();
1468
+ let body : {[key: string ]: any} = { };
1469
+ if (!$dara.isNull(request.apiKey)) {
1470
+ body["apiKey"] = request.apiKey;
1471
+ }
1472
+
1473
+ if (!$dara.isNull(request.customLimitation)) {
1474
+ body["customLimitation"] = request.customLimitation;
1475
+ }
1476
+
1477
+ if (!$dara.isNull(request.customPrompt)) {
1478
+ body["customPrompt"] = request.customPrompt;
1479
+ }
1480
+
1481
+ if (!$dara.isNull(request.inputExample)) {
1482
+ body["inputExample"] = request.inputExample;
1483
+ }
1484
+
1485
+ if (!$dara.isNull(request.modelId)) {
1486
+ body["modelId"] = request.modelId;
1487
+ }
1488
+
1489
+ if (!$dara.isNull(request.outputExample)) {
1490
+ body["outputExample"] = request.outputExample;
1491
+ }
1492
+
1493
+ if (!$dara.isNull(request.sourceMaterial)) {
1494
+ body["sourceMaterial"] = request.sourceMaterial;
1495
+ }
1496
+
1497
+ if (!$dara.isNull(request.writingType)) {
1498
+ body["writingType"] = request.writingType;
1499
+ }
1500
+
1501
+ let req = new $OpenApiUtil.OpenApiRequest({
1502
+ headers: headers,
1503
+ body: OpenApiUtil.parseToMap(body),
1504
+ });
1505
+ let params = new $OpenApiUtil.Params({
1506
+ action: "RunMarketingInformationWriting",
1507
+ version: "2024-08-01",
1508
+ protocol: "HTTPS",
1509
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runMarketingInformationWriting`,
1510
+ method: "POST",
1511
+ authType: "AK",
1512
+ style: "ROA",
1513
+ reqBodyType: "formData",
1514
+ bodyType: "json",
1515
+ });
1516
+ let sseResp = await this.callSSEApi(params, req, runtime);
1517
+
1518
+ for await (let resp of sseResp) {
1519
+ let data = JSON.parse(resp.event.data);
1520
+ yield $dara.cast<$_model.RunMarketingInformationWritingResponse>({
1521
+ statusCode: resp.statusCode,
1522
+ headers: resp.headers,
1523
+ body: {
1524
+ ...data,
1525
+ RequestId: resp.event.id,
1526
+ Message: resp.event.event,
1527
+ },
1528
+ }, new $_model.RunMarketingInformationWritingResponse({}));
1529
+ }
1530
+ }
1531
+
1015
1532
  /**
1016
1533
  * 营销文案写作服务
1017
1534
  *
@@ -1093,7 +1610,7 @@ export default class Client extends OpenApi {
1093
1610
  * @param runtime - runtime options for this request RuntimeOptions
1094
1611
  * @returns RunNetworkContentAuditResponse
1095
1612
  */
1096
- async runNetworkContentAuditWithOptions(workspaceId: string, tmpReq: $_model.RunNetworkContentAuditRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunNetworkContentAuditResponse> {
1613
+ async *runNetworkContentAuditWithSSE(workspaceId: string, tmpReq: $_model.RunNetworkContentAuditRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunNetworkContentAuditResponse, any, unknown> {
1097
1614
  tmpReq.validate();
1098
1615
  let request = new $_model.RunNetworkContentAuditShrinkRequest({ });
1099
1616
  OpenApiUtil.convert(tmpReq, request);
@@ -1149,38 +1666,172 @@ export default class Client extends OpenApi {
1149
1666
  reqBodyType: "formData",
1150
1667
  bodyType: "json",
1151
1668
  });
1152
- return $dara.cast<$_model.RunNetworkContentAuditResponse>(await this.callApi(params, req, runtime), new $_model.RunNetworkContentAuditResponse({}));
1153
- }
1669
+ let sseResp = await this.callSSEApi(params, req, runtime);
1154
1670
 
1155
- /**
1156
- * 轻应用-网络内容审核
1157
- *
1158
- * @param request - RunNetworkContentAuditRequest
1159
- * @returns RunNetworkContentAuditResponse
1160
- */
1161
- async runNetworkContentAudit(workspaceId: string, request: $_model.RunNetworkContentAuditRequest): Promise<$_model.RunNetworkContentAuditResponse> {
1162
- let runtime = new $dara.RuntimeOptions({ });
1163
- let headers : {[key: string ]: string} = { };
1164
- return await this.runNetworkContentAuditWithOptions(workspaceId, request, headers, runtime);
1671
+ for await (let resp of sseResp) {
1672
+ let data = JSON.parse(resp.event.data);
1673
+ yield $dara.cast<$_model.RunNetworkContentAuditResponse>({
1674
+ statusCode: resp.statusCode,
1675
+ headers: resp.headers,
1676
+ body: {
1677
+ ...data,
1678
+ RequestId: resp.event.id,
1679
+ Message: resp.event.event,
1680
+ },
1681
+ }, new $_model.RunNetworkContentAuditResponse({}));
1682
+ }
1165
1683
  }
1166
1684
 
1167
1685
  /**
1168
- * 作业批改
1686
+ * 轻应用-网络内容审核
1169
1687
  *
1170
- * @param request - RunOcrParseRequest
1688
+ * @param tmpReq - RunNetworkContentAuditRequest
1171
1689
  * @param headers - map
1172
1690
  * @param runtime - runtime options for this request RuntimeOptions
1173
- * @returns RunOcrParseResponse
1691
+ * @returns RunNetworkContentAuditResponse
1174
1692
  */
1175
- async runOcrParseWithOptions(workspaceId: string, request: $_model.RunOcrParseRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunOcrParseResponse> {
1176
- request.validate();
1177
- let body : {[key: string ]: any} = { };
1178
- if (!$dara.isNull(request.fileKey)) {
1179
- body["fileKey"] = request.fileKey;
1180
- }
1181
-
1182
- if (!$dara.isNull(request.modelId)) {
1183
- body["modelId"] = request.modelId;
1693
+ async runNetworkContentAuditWithOptions(workspaceId: string, tmpReq: $_model.RunNetworkContentAuditRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunNetworkContentAuditResponse> {
1694
+ tmpReq.validate();
1695
+ let request = new $_model.RunNetworkContentAuditShrinkRequest({ });
1696
+ OpenApiUtil.convert(tmpReq, request);
1697
+ if (!$dara.isNull(tmpReq.tags)) {
1698
+ request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
1699
+ }
1700
+
1701
+ let body : {[key: string ]: any} = { };
1702
+ if (!$dara.isNull(request.apiKey)) {
1703
+ body["apiKey"] = request.apiKey;
1704
+ }
1705
+
1706
+ if (!$dara.isNull(request.businessType)) {
1707
+ body["businessType"] = request.businessType;
1708
+ }
1709
+
1710
+ if (!$dara.isNull(request.content)) {
1711
+ body["content"] = request.content;
1712
+ }
1713
+
1714
+ if (!$dara.isNull(request.extraInfo)) {
1715
+ body["extraInfo"] = request.extraInfo;
1716
+ }
1717
+
1718
+ if (!$dara.isNull(request.modelId)) {
1719
+ body["modelId"] = request.modelId;
1720
+ }
1721
+
1722
+ if (!$dara.isNull(request.outputFormat)) {
1723
+ body["outputFormat"] = request.outputFormat;
1724
+ }
1725
+
1726
+ if (!$dara.isNull(request.tagsShrink)) {
1727
+ body["tags"] = request.tagsShrink;
1728
+ }
1729
+
1730
+ if (!$dara.isNull(request.taskDescription)) {
1731
+ body["taskDescription"] = request.taskDescription;
1732
+ }
1733
+
1734
+ let req = new $OpenApiUtil.OpenApiRequest({
1735
+ headers: headers,
1736
+ body: OpenApiUtil.parseToMap(body),
1737
+ });
1738
+ let params = new $OpenApiUtil.Params({
1739
+ action: "RunNetworkContentAudit",
1740
+ version: "2024-08-01",
1741
+ protocol: "HTTPS",
1742
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runNetworkContentAudit`,
1743
+ method: "POST",
1744
+ authType: "AK",
1745
+ style: "ROA",
1746
+ reqBodyType: "formData",
1747
+ bodyType: "json",
1748
+ });
1749
+ return $dara.cast<$_model.RunNetworkContentAuditResponse>(await this.callApi(params, req, runtime), new $_model.RunNetworkContentAuditResponse({}));
1750
+ }
1751
+
1752
+ /**
1753
+ * 轻应用-网络内容审核
1754
+ *
1755
+ * @param request - RunNetworkContentAuditRequest
1756
+ * @returns RunNetworkContentAuditResponse
1757
+ */
1758
+ async runNetworkContentAudit(workspaceId: string, request: $_model.RunNetworkContentAuditRequest): Promise<$_model.RunNetworkContentAuditResponse> {
1759
+ let runtime = new $dara.RuntimeOptions({ });
1760
+ let headers : {[key: string ]: string} = { };
1761
+ return await this.runNetworkContentAuditWithOptions(workspaceId, request, headers, runtime);
1762
+ }
1763
+
1764
+ /**
1765
+ * 作业批改
1766
+ *
1767
+ * @param request - RunOcrParseRequest
1768
+ * @param headers - map
1769
+ * @param runtime - runtime options for this request RuntimeOptions
1770
+ * @returns RunOcrParseResponse
1771
+ */
1772
+ async *runOcrParseWithSSE(workspaceId: string, request: $_model.RunOcrParseRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunOcrParseResponse, any, unknown> {
1773
+ request.validate();
1774
+ let body : {[key: string ]: any} = { };
1775
+ if (!$dara.isNull(request.fileKey)) {
1776
+ body["fileKey"] = request.fileKey;
1777
+ }
1778
+
1779
+ if (!$dara.isNull(request.modelId)) {
1780
+ body["modelId"] = request.modelId;
1781
+ }
1782
+
1783
+ if (!$dara.isNull(request.url)) {
1784
+ body["url"] = request.url;
1785
+ }
1786
+
1787
+ let req = new $OpenApiUtil.OpenApiRequest({
1788
+ headers: headers,
1789
+ body: OpenApiUtil.parseToMap(body),
1790
+ });
1791
+ let params = new $OpenApiUtil.Params({
1792
+ action: "RunOcrParse",
1793
+ version: "2024-08-01",
1794
+ protocol: "HTTPS",
1795
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runOcrParse`,
1796
+ method: "POST",
1797
+ authType: "AK",
1798
+ style: "ROA",
1799
+ reqBodyType: "formData",
1800
+ bodyType: "json",
1801
+ });
1802
+ let sseResp = await this.callSSEApi(params, req, runtime);
1803
+
1804
+ for await (let resp of sseResp) {
1805
+ let data = JSON.parse(resp.event.data);
1806
+ yield $dara.cast<$_model.RunOcrParseResponse>({
1807
+ statusCode: resp.statusCode,
1808
+ headers: resp.headers,
1809
+ body: {
1810
+ ...data,
1811
+ RequestId: resp.event.id,
1812
+ Message: resp.event.event,
1813
+ },
1814
+ }, new $_model.RunOcrParseResponse({}));
1815
+ }
1816
+ }
1817
+
1818
+ /**
1819
+ * 作业批改
1820
+ *
1821
+ * @param request - RunOcrParseRequest
1822
+ * @param headers - map
1823
+ * @param runtime - runtime options for this request RuntimeOptions
1824
+ * @returns RunOcrParseResponse
1825
+ */
1826
+ async runOcrParseWithOptions(workspaceId: string, request: $_model.RunOcrParseRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunOcrParseResponse> {
1827
+ request.validate();
1828
+ let body : {[key: string ]: any} = { };
1829
+ if (!$dara.isNull(request.fileKey)) {
1830
+ body["fileKey"] = request.fileKey;
1831
+ }
1832
+
1833
+ if (!$dara.isNull(request.modelId)) {
1834
+ body["modelId"] = request.modelId;
1184
1835
  }
1185
1836
 
1186
1837
  if (!$dara.isNull(request.url)) {
@@ -1217,6 +1868,56 @@ export default class Client extends OpenApi {
1217
1868
  return await this.runOcrParseWithOptions(workspaceId, request, headers, runtime);
1218
1869
  }
1219
1870
 
1871
+ /**
1872
+ * 长剧本创作
1873
+ *
1874
+ * @param request - RunScriptChatRequest
1875
+ * @param headers - map
1876
+ * @param runtime - runtime options for this request RuntimeOptions
1877
+ * @returns RunScriptChatResponse
1878
+ */
1879
+ async *runScriptChatWithSSE(workspaceId: string, request: $_model.RunScriptChatRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunScriptChatResponse, any, unknown> {
1880
+ request.validate();
1881
+ let body : {[key: string ]: any} = { };
1882
+ if (!$dara.isNull(request.prompt)) {
1883
+ body["prompt"] = request.prompt;
1884
+ }
1885
+
1886
+ if (!$dara.isNull(request.taskId)) {
1887
+ body["taskId"] = request.taskId;
1888
+ }
1889
+
1890
+ let req = new $OpenApiUtil.OpenApiRequest({
1891
+ headers: headers,
1892
+ body: OpenApiUtil.parseToMap(body),
1893
+ });
1894
+ let params = new $OpenApiUtil.Params({
1895
+ action: "RunScriptChat",
1896
+ version: "2024-08-01",
1897
+ protocol: "HTTPS",
1898
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runScriptChat`,
1899
+ method: "POST",
1900
+ authType: "AK",
1901
+ style: "ROA",
1902
+ reqBodyType: "formData",
1903
+ bodyType: "json",
1904
+ });
1905
+ let sseResp = await this.callSSEApi(params, req, runtime);
1906
+
1907
+ for await (let resp of sseResp) {
1908
+ let data = JSON.parse(resp.event.data);
1909
+ yield $dara.cast<$_model.RunScriptChatResponse>({
1910
+ statusCode: resp.statusCode,
1911
+ headers: resp.headers,
1912
+ body: {
1913
+ ...data,
1914
+ RequestId: resp.event.id,
1915
+ Message: resp.event.event,
1916
+ },
1917
+ }, new $_model.RunScriptChatResponse({}));
1918
+ }
1919
+ }
1920
+
1220
1921
  /**
1221
1922
  * 长剧本创作
1222
1923
  *
@@ -1266,6 +1967,60 @@ export default class Client extends OpenApi {
1266
1967
  return await this.runScriptChatWithOptions(workspaceId, request, headers, runtime);
1267
1968
  }
1268
1969
 
1970
+ /**
1971
+ * 剧本续写
1972
+ *
1973
+ * @param request - RunScriptContinueRequest
1974
+ * @param headers - map
1975
+ * @param runtime - runtime options for this request RuntimeOptions
1976
+ * @returns RunScriptContinueResponse
1977
+ */
1978
+ async *runScriptContinueWithSSE(workspaceId: string, request: $_model.RunScriptContinueRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunScriptContinueResponse, any, unknown> {
1979
+ request.validate();
1980
+ let body : {[key: string ]: any} = { };
1981
+ if (!$dara.isNull(request.scriptSummary)) {
1982
+ body["scriptSummary"] = request.scriptSummary;
1983
+ }
1984
+
1985
+ if (!$dara.isNull(request.scriptTypeKeyword)) {
1986
+ body["scriptTypeKeyword"] = request.scriptTypeKeyword;
1987
+ }
1988
+
1989
+ if (!$dara.isNull(request.userProvidedContent)) {
1990
+ body["userProvidedContent"] = request.userProvidedContent;
1991
+ }
1992
+
1993
+ let req = new $OpenApiUtil.OpenApiRequest({
1994
+ headers: headers,
1995
+ body: OpenApiUtil.parseToMap(body),
1996
+ });
1997
+ let params = new $OpenApiUtil.Params({
1998
+ action: "RunScriptContinue",
1999
+ version: "2024-08-01",
2000
+ protocol: "HTTPS",
2001
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runScriptContinue`,
2002
+ method: "POST",
2003
+ authType: "AK",
2004
+ style: "ROA",
2005
+ reqBodyType: "formData",
2006
+ bodyType: "json",
2007
+ });
2008
+ let sseResp = await this.callSSEApi(params, req, runtime);
2009
+
2010
+ for await (let resp of sseResp) {
2011
+ let data = JSON.parse(resp.event.data);
2012
+ yield $dara.cast<$_model.RunScriptContinueResponse>({
2013
+ statusCode: resp.statusCode,
2014
+ headers: resp.headers,
2015
+ body: {
2016
+ ...data,
2017
+ RequestId: resp.event.id,
2018
+ Message: resp.event.event,
2019
+ },
2020
+ }, new $_model.RunScriptContinueResponse({}));
2021
+ }
2022
+ }
2023
+
1269
2024
  /**
1270
2025
  * 剧本续写
1271
2026
  *
@@ -1327,7 +2082,7 @@ export default class Client extends OpenApi {
1327
2082
  * @param runtime - runtime options for this request RuntimeOptions
1328
2083
  * @returns RunScriptPlanningResponse
1329
2084
  */
1330
- async runScriptPlanningWithOptions(workspaceId: string, request: $_model.RunScriptPlanningRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunScriptPlanningResponse> {
2085
+ async *runScriptPlanningWithSSE(workspaceId: string, request: $_model.RunScriptPlanningRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunScriptPlanningResponse, any, unknown> {
1331
2086
  request.validate();
1332
2087
  let body : {[key: string ]: any} = { };
1333
2088
  if (!$dara.isNull(request.additionalNote)) {
@@ -1373,34 +2128,59 @@ export default class Client extends OpenApi {
1373
2128
  reqBodyType: "formData",
1374
2129
  bodyType: "json",
1375
2130
  });
1376
- return $dara.cast<$_model.RunScriptPlanningResponse>(await this.callApi(params, req, runtime), new $_model.RunScriptPlanningResponse({}));
2131
+ let sseResp = await this.callSSEApi(params, req, runtime);
2132
+
2133
+ for await (let resp of sseResp) {
2134
+ let data = JSON.parse(resp.event.data);
2135
+ yield $dara.cast<$_model.RunScriptPlanningResponse>({
2136
+ statusCode: resp.statusCode,
2137
+ headers: resp.headers,
2138
+ body: {
2139
+ ...data,
2140
+ RequestId: resp.event.id,
2141
+ Message: resp.event.event,
2142
+ },
2143
+ }, new $_model.RunScriptPlanningResponse({}));
2144
+ }
1377
2145
  }
1378
2146
 
1379
2147
  /**
1380
2148
  * 剧本策划
1381
2149
  *
1382
2150
  * @param request - RunScriptPlanningRequest
1383
- * @returns RunScriptPlanningResponse
1384
- */
1385
- async runScriptPlanning(workspaceId: string, request: $_model.RunScriptPlanningRequest): Promise<$_model.RunScriptPlanningResponse> {
1386
- let runtime = new $dara.RuntimeOptions({ });
1387
- let headers : {[key: string ]: string} = { };
1388
- return await this.runScriptPlanningWithOptions(workspaceId, request, headers, runtime);
1389
- }
1390
-
1391
- /**
1392
- * 剧本对话内容的整理
1393
- *
1394
- * @param request - RunScriptRefineRequest
1395
2151
  * @param headers - map
1396
2152
  * @param runtime - runtime options for this request RuntimeOptions
1397
- * @returns RunScriptRefineResponse
2153
+ * @returns RunScriptPlanningResponse
1398
2154
  */
1399
- async runScriptRefineWithOptions(workspaceId: string, request: $_model.RunScriptRefineRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunScriptRefineResponse> {
2155
+ async runScriptPlanningWithOptions(workspaceId: string, request: $_model.RunScriptPlanningRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunScriptPlanningResponse> {
1400
2156
  request.validate();
1401
2157
  let body : {[key: string ]: any} = { };
1402
- if (!$dara.isNull(request.taskId)) {
1403
- body["taskId"] = request.taskId;
2158
+ if (!$dara.isNull(request.additionalNote)) {
2159
+ body["additionalNote"] = request.additionalNote;
2160
+ }
2161
+
2162
+ if (!$dara.isNull(request.dialogueInScene)) {
2163
+ body["dialogueInScene"] = request.dialogueInScene;
2164
+ }
2165
+
2166
+ if (!$dara.isNull(request.plotConflict)) {
2167
+ body["plotConflict"] = request.plotConflict;
2168
+ }
2169
+
2170
+ if (!$dara.isNull(request.scriptName)) {
2171
+ body["scriptName"] = request.scriptName;
2172
+ }
2173
+
2174
+ if (!$dara.isNull(request.scriptShotCount)) {
2175
+ body["scriptShotCount"] = request.scriptShotCount;
2176
+ }
2177
+
2178
+ if (!$dara.isNull(request.scriptSummary)) {
2179
+ body["scriptSummary"] = request.scriptSummary;
2180
+ }
2181
+
2182
+ if (!$dara.isNull(request.scriptTypeKeyword)) {
2183
+ body["scriptTypeKeyword"] = request.scriptTypeKeyword;
1404
2184
  }
1405
2185
 
1406
2186
  let req = new $OpenApiUtil.OpenApiRequest({
@@ -1408,7 +2188,98 @@ export default class Client extends OpenApi {
1408
2188
  body: OpenApiUtil.parseToMap(body),
1409
2189
  });
1410
2190
  let params = new $OpenApiUtil.Params({
1411
- action: "RunScriptRefine",
2191
+ action: "RunScriptPlanning",
2192
+ version: "2024-08-01",
2193
+ protocol: "HTTPS",
2194
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runScriptPlanning`,
2195
+ method: "POST",
2196
+ authType: "AK",
2197
+ style: "ROA",
2198
+ reqBodyType: "formData",
2199
+ bodyType: "json",
2200
+ });
2201
+ return $dara.cast<$_model.RunScriptPlanningResponse>(await this.callApi(params, req, runtime), new $_model.RunScriptPlanningResponse({}));
2202
+ }
2203
+
2204
+ /**
2205
+ * 剧本策划
2206
+ *
2207
+ * @param request - RunScriptPlanningRequest
2208
+ * @returns RunScriptPlanningResponse
2209
+ */
2210
+ async runScriptPlanning(workspaceId: string, request: $_model.RunScriptPlanningRequest): Promise<$_model.RunScriptPlanningResponse> {
2211
+ let runtime = new $dara.RuntimeOptions({ });
2212
+ let headers : {[key: string ]: string} = { };
2213
+ return await this.runScriptPlanningWithOptions(workspaceId, request, headers, runtime);
2214
+ }
2215
+
2216
+ /**
2217
+ * 剧本对话内容的整理
2218
+ *
2219
+ * @param request - RunScriptRefineRequest
2220
+ * @param headers - map
2221
+ * @param runtime - runtime options for this request RuntimeOptions
2222
+ * @returns RunScriptRefineResponse
2223
+ */
2224
+ async *runScriptRefineWithSSE(workspaceId: string, request: $_model.RunScriptRefineRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunScriptRefineResponse, any, unknown> {
2225
+ request.validate();
2226
+ let body : {[key: string ]: any} = { };
2227
+ if (!$dara.isNull(request.taskId)) {
2228
+ body["taskId"] = request.taskId;
2229
+ }
2230
+
2231
+ let req = new $OpenApiUtil.OpenApiRequest({
2232
+ headers: headers,
2233
+ body: OpenApiUtil.parseToMap(body),
2234
+ });
2235
+ let params = new $OpenApiUtil.Params({
2236
+ action: "RunScriptRefine",
2237
+ version: "2024-08-01",
2238
+ protocol: "HTTPS",
2239
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runScriptRefine`,
2240
+ method: "POST",
2241
+ authType: "AK",
2242
+ style: "ROA",
2243
+ reqBodyType: "formData",
2244
+ bodyType: "json",
2245
+ });
2246
+ let sseResp = await this.callSSEApi(params, req, runtime);
2247
+
2248
+ for await (let resp of sseResp) {
2249
+ let data = JSON.parse(resp.event.data);
2250
+ yield $dara.cast<$_model.RunScriptRefineResponse>({
2251
+ statusCode: resp.statusCode,
2252
+ headers: resp.headers,
2253
+ body: {
2254
+ ...data,
2255
+ RequestId: resp.event.id,
2256
+ Message: resp.event.event,
2257
+ },
2258
+ }, new $_model.RunScriptRefineResponse({}));
2259
+ }
2260
+ }
2261
+
2262
+ /**
2263
+ * 剧本对话内容的整理
2264
+ *
2265
+ * @param request - RunScriptRefineRequest
2266
+ * @param headers - map
2267
+ * @param runtime - runtime options for this request RuntimeOptions
2268
+ * @returns RunScriptRefineResponse
2269
+ */
2270
+ async runScriptRefineWithOptions(workspaceId: string, request: $_model.RunScriptRefineRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.RunScriptRefineResponse> {
2271
+ request.validate();
2272
+ let body : {[key: string ]: any} = { };
2273
+ if (!$dara.isNull(request.taskId)) {
2274
+ body["taskId"] = request.taskId;
2275
+ }
2276
+
2277
+ let req = new $OpenApiUtil.OpenApiRequest({
2278
+ headers: headers,
2279
+ body: OpenApiUtil.parseToMap(body),
2280
+ });
2281
+ let params = new $OpenApiUtil.Params({
2282
+ action: "RunScriptRefine",
1412
2283
  version: "2024-08-01",
1413
2284
  protocol: "HTTPS",
1414
2285
  pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runScriptRefine`,
@@ -1433,6 +2304,82 @@ export default class Client extends OpenApi {
1433
2304
  return await this.runScriptRefineWithOptions(workspaceId, request, headers, runtime);
1434
2305
  }
1435
2306
 
2307
+ /**
2308
+ * 文体学习和写作推理服务
2309
+ *
2310
+ * @param tmpReq - RunStyleWritingRequest
2311
+ * @param headers - map
2312
+ * @param runtime - runtime options for this request RuntimeOptions
2313
+ * @returns RunStyleWritingResponse
2314
+ */
2315
+ async *runStyleWritingWithSSE(workspaceId: string, tmpReq: $_model.RunStyleWritingRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunStyleWritingResponse, any, unknown> {
2316
+ tmpReq.validate();
2317
+ let request = new $_model.RunStyleWritingShrinkRequest({ });
2318
+ OpenApiUtil.convert(tmpReq, request);
2319
+ if (!$dara.isNull(tmpReq.learningSamples)) {
2320
+ request.learningSamplesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.learningSamples, "learningSamples", "json");
2321
+ }
2322
+
2323
+ if (!$dara.isNull(tmpReq.referenceMaterials)) {
2324
+ request.referenceMaterialsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.referenceMaterials, "referenceMaterials", "json");
2325
+ }
2326
+
2327
+ let body : {[key: string ]: any} = { };
2328
+ if (!$dara.isNull(request.learningSamplesShrink)) {
2329
+ body["learningSamples"] = request.learningSamplesShrink;
2330
+ }
2331
+
2332
+ if (!$dara.isNull(request.processStage)) {
2333
+ body["processStage"] = request.processStage;
2334
+ }
2335
+
2336
+ if (!$dara.isNull(request.referenceMaterialsShrink)) {
2337
+ body["referenceMaterials"] = request.referenceMaterialsShrink;
2338
+ }
2339
+
2340
+ if (!$dara.isNull(request.styleFeature)) {
2341
+ body["styleFeature"] = request.styleFeature;
2342
+ }
2343
+
2344
+ if (!$dara.isNull(request.useSearch)) {
2345
+ body["useSearch"] = request.useSearch;
2346
+ }
2347
+
2348
+ if (!$dara.isNull(request.writingTheme)) {
2349
+ body["writingTheme"] = request.writingTheme;
2350
+ }
2351
+
2352
+ let req = new $OpenApiUtil.OpenApiRequest({
2353
+ headers: headers,
2354
+ body: OpenApiUtil.parseToMap(body),
2355
+ });
2356
+ let params = new $OpenApiUtil.Params({
2357
+ action: "RunStyleWriting",
2358
+ version: "2024-08-01",
2359
+ protocol: "HTTPS",
2360
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runStyleWriting`,
2361
+ method: "POST",
2362
+ authType: "AK",
2363
+ style: "ROA",
2364
+ reqBodyType: "formData",
2365
+ bodyType: "json",
2366
+ });
2367
+ let sseResp = await this.callSSEApi(params, req, runtime);
2368
+
2369
+ for await (let resp of sseResp) {
2370
+ let data = JSON.parse(resp.event.data);
2371
+ yield $dara.cast<$_model.RunStyleWritingResponse>({
2372
+ statusCode: resp.statusCode,
2373
+ headers: resp.headers,
2374
+ body: {
2375
+ ...data,
2376
+ RequestId: resp.event.id,
2377
+ Message: resp.event.event,
2378
+ },
2379
+ }, new $_model.RunStyleWritingResponse({}));
2380
+ }
2381
+ }
2382
+
1436
2383
  /**
1437
2384
  * 文体学习和写作推理服务
1438
2385
  *
@@ -1508,6 +2455,86 @@ export default class Client extends OpenApi {
1508
2455
  return await this.runStyleWritingWithOptions(workspaceId, request, headers, runtime);
1509
2456
  }
1510
2457
 
2458
+ /**
2459
+ * 轻应用-标签挖掘
2460
+ *
2461
+ * @param tmpReq - RunTagMiningAnalysisRequest
2462
+ * @param headers - map
2463
+ * @param runtime - runtime options for this request RuntimeOptions
2464
+ * @returns RunTagMiningAnalysisResponse
2465
+ */
2466
+ async *runTagMiningAnalysisWithSSE(workspaceId: string, tmpReq: $_model.RunTagMiningAnalysisRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunTagMiningAnalysisResponse, any, unknown> {
2467
+ tmpReq.validate();
2468
+ let request = new $_model.RunTagMiningAnalysisShrinkRequest({ });
2469
+ OpenApiUtil.convert(tmpReq, request);
2470
+ if (!$dara.isNull(tmpReq.tags)) {
2471
+ request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
2472
+ }
2473
+
2474
+ let body : {[key: string ]: any} = { };
2475
+ if (!$dara.isNull(request.apiKey)) {
2476
+ body["apiKey"] = request.apiKey;
2477
+ }
2478
+
2479
+ if (!$dara.isNull(request.businessType)) {
2480
+ body["businessType"] = request.businessType;
2481
+ }
2482
+
2483
+ if (!$dara.isNull(request.content)) {
2484
+ body["content"] = request.content;
2485
+ }
2486
+
2487
+ if (!$dara.isNull(request.extraInfo)) {
2488
+ body["extraInfo"] = request.extraInfo;
2489
+ }
2490
+
2491
+ if (!$dara.isNull(request.modelId)) {
2492
+ body["modelId"] = request.modelId;
2493
+ }
2494
+
2495
+ if (!$dara.isNull(request.outputFormat)) {
2496
+ body["outputFormat"] = request.outputFormat;
2497
+ }
2498
+
2499
+ if (!$dara.isNull(request.tagsShrink)) {
2500
+ body["tags"] = request.tagsShrink;
2501
+ }
2502
+
2503
+ if (!$dara.isNull(request.taskDescription)) {
2504
+ body["taskDescription"] = request.taskDescription;
2505
+ }
2506
+
2507
+ let req = new $OpenApiUtil.OpenApiRequest({
2508
+ headers: headers,
2509
+ body: OpenApiUtil.parseToMap(body),
2510
+ });
2511
+ let params = new $OpenApiUtil.Params({
2512
+ action: "RunTagMiningAnalysis",
2513
+ version: "2024-08-01",
2514
+ protocol: "HTTPS",
2515
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runTagMiningAnalysis`,
2516
+ method: "POST",
2517
+ authType: "AK",
2518
+ style: "ROA",
2519
+ reqBodyType: "formData",
2520
+ bodyType: "json",
2521
+ });
2522
+ let sseResp = await this.callSSEApi(params, req, runtime);
2523
+
2524
+ for await (let resp of sseResp) {
2525
+ let data = JSON.parse(resp.event.data);
2526
+ yield $dara.cast<$_model.RunTagMiningAnalysisResponse>({
2527
+ statusCode: resp.statusCode,
2528
+ headers: resp.headers,
2529
+ body: {
2530
+ ...data,
2531
+ RequestId: resp.event.id,
2532
+ Message: resp.event.event,
2533
+ },
2534
+ }, new $_model.RunTagMiningAnalysisResponse({}));
2535
+ }
2536
+ }
2537
+
1511
2538
  /**
1512
2539
  * 轻应用-标签挖掘
1513
2540
  *
@@ -1587,6 +2614,158 @@ export default class Client extends OpenApi {
1587
2614
  return await this.runTagMiningAnalysisWithOptions(workspaceId, request, headers, runtime);
1588
2615
  }
1589
2616
 
2617
+ /**
2618
+ * 轻应用-视频理解
2619
+ *
2620
+ * @param tmpReq - RunVideoAnalysisRequest
2621
+ * @param headers - map
2622
+ * @param runtime - runtime options for this request RuntimeOptions
2623
+ * @returns RunVideoAnalysisResponse
2624
+ */
2625
+ async *runVideoAnalysisWithSSE(workspaceId: string, tmpReq: $_model.RunVideoAnalysisRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.RunVideoAnalysisResponse, any, unknown> {
2626
+ tmpReq.validate();
2627
+ let request = new $_model.RunVideoAnalysisShrinkRequest({ });
2628
+ OpenApiUtil.convert(tmpReq, request);
2629
+ if (!$dara.isNull(tmpReq.excludeGenerateOptions)) {
2630
+ request.excludeGenerateOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.excludeGenerateOptions, "excludeGenerateOptions", "json");
2631
+ }
2632
+
2633
+ if (!$dara.isNull(tmpReq.frameSampleMethod)) {
2634
+ request.frameSampleMethodShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.frameSampleMethod, "frameSampleMethod", "json");
2635
+ }
2636
+
2637
+ if (!$dara.isNull(tmpReq.generateOptions)) {
2638
+ request.generateOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.generateOptions, "generateOptions", "json");
2639
+ }
2640
+
2641
+ if (!$dara.isNull(tmpReq.textProcessTasks)) {
2642
+ request.textProcessTasksShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.textProcessTasks, "textProcessTasks", "json");
2643
+ }
2644
+
2645
+ if (!$dara.isNull(tmpReq.videoCaptionInfo)) {
2646
+ request.videoCaptionInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.videoCaptionInfo, "videoCaptionInfo", "json");
2647
+ }
2648
+
2649
+ if (!$dara.isNull(tmpReq.videoRoles)) {
2650
+ request.videoRolesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.videoRoles, "videoRoles", "json");
2651
+ }
2652
+
2653
+ let body : {[key: string ]: any} = { };
2654
+ if (!$dara.isNull(request.autoRoleRecognitionVideoUrl)) {
2655
+ body["autoRoleRecognitionVideoUrl"] = request.autoRoleRecognitionVideoUrl;
2656
+ }
2657
+
2658
+ if (!$dara.isNull(request.excludeGenerateOptionsShrink)) {
2659
+ body["excludeGenerateOptions"] = request.excludeGenerateOptionsShrink;
2660
+ }
2661
+
2662
+ if (!$dara.isNull(request.faceIdentitySimilarityMinScore)) {
2663
+ body["faceIdentitySimilarityMinScore"] = request.faceIdentitySimilarityMinScore;
2664
+ }
2665
+
2666
+ if (!$dara.isNull(request.frameSampleMethodShrink)) {
2667
+ body["frameSampleMethod"] = request.frameSampleMethodShrink;
2668
+ }
2669
+
2670
+ if (!$dara.isNull(request.generateOptionsShrink)) {
2671
+ body["generateOptions"] = request.generateOptionsShrink;
2672
+ }
2673
+
2674
+ if (!$dara.isNull(request.language)) {
2675
+ body["language"] = request.language;
2676
+ }
2677
+
2678
+ if (!$dara.isNull(request.modelCustomPromptTemplate)) {
2679
+ body["modelCustomPromptTemplate"] = request.modelCustomPromptTemplate;
2680
+ }
2681
+
2682
+ if (!$dara.isNull(request.modelCustomPromptTemplateId)) {
2683
+ body["modelCustomPromptTemplateId"] = request.modelCustomPromptTemplateId;
2684
+ }
2685
+
2686
+ if (!$dara.isNull(request.modelId)) {
2687
+ body["modelId"] = request.modelId;
2688
+ }
2689
+
2690
+ if (!$dara.isNull(request.originalSessionId)) {
2691
+ body["originalSessionId"] = request.originalSessionId;
2692
+ }
2693
+
2694
+ if (!$dara.isNull(request.snapshotInterval)) {
2695
+ body["snapshotInterval"] = request.snapshotInterval;
2696
+ }
2697
+
2698
+ if (!$dara.isNull(request.splitInterval)) {
2699
+ body["splitInterval"] = request.splitInterval;
2700
+ }
2701
+
2702
+ if (!$dara.isNull(request.taskId)) {
2703
+ body["taskId"] = request.taskId;
2704
+ }
2705
+
2706
+ if (!$dara.isNull(request.textProcessTasksShrink)) {
2707
+ body["textProcessTasks"] = request.textProcessTasksShrink;
2708
+ }
2709
+
2710
+ if (!$dara.isNull(request.videoCaptionInfoShrink)) {
2711
+ body["videoCaptionInfo"] = request.videoCaptionInfoShrink;
2712
+ }
2713
+
2714
+ if (!$dara.isNull(request.videoExtraInfo)) {
2715
+ body["videoExtraInfo"] = request.videoExtraInfo;
2716
+ }
2717
+
2718
+ if (!$dara.isNull(request.videoModelCustomPromptTemplate)) {
2719
+ body["videoModelCustomPromptTemplate"] = request.videoModelCustomPromptTemplate;
2720
+ }
2721
+
2722
+ if (!$dara.isNull(request.videoModelId)) {
2723
+ body["videoModelId"] = request.videoModelId;
2724
+ }
2725
+
2726
+ if (!$dara.isNull(request.videoRolesShrink)) {
2727
+ body["videoRoles"] = request.videoRolesShrink;
2728
+ }
2729
+
2730
+ if (!$dara.isNull(request.videoShotFaceIdentityCount)) {
2731
+ body["videoShotFaceIdentityCount"] = request.videoShotFaceIdentityCount;
2732
+ }
2733
+
2734
+ if (!$dara.isNull(request.videoUrl)) {
2735
+ body["videoUrl"] = request.videoUrl;
2736
+ }
2737
+
2738
+ let req = new $OpenApiUtil.OpenApiRequest({
2739
+ headers: headers,
2740
+ body: OpenApiUtil.parseToMap(body),
2741
+ });
2742
+ let params = new $OpenApiUtil.Params({
2743
+ action: "RunVideoAnalysis",
2744
+ version: "2024-08-01",
2745
+ protocol: "HTTPS",
2746
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runVideoAnalysis`,
2747
+ method: "POST",
2748
+ authType: "AK",
2749
+ style: "ROA",
2750
+ reqBodyType: "formData",
2751
+ bodyType: "json",
2752
+ });
2753
+ let sseResp = await this.callSSEApi(params, req, runtime);
2754
+
2755
+ for await (let resp of sseResp) {
2756
+ let data = JSON.parse(resp.event.data);
2757
+ yield $dara.cast<$_model.RunVideoAnalysisResponse>({
2758
+ statusCode: resp.statusCode,
2759
+ headers: resp.headers,
2760
+ body: {
2761
+ ...data,
2762
+ RequestId: resp.event.id,
2763
+ Message: resp.event.event,
2764
+ },
2765
+ }, new $_model.RunVideoAnalysisResponse({}));
2766
+ }
2767
+ }
2768
+
1590
2769
  /**
1591
2770
  * 轻应用-视频理解
1592
2771
  *