@alicloud/quanmiaolightapp20240801 1.5.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/client.ts CHANGED
@@ -260,92 +260,6 @@ export class ListHotTopicSummariesResponse extends $tea.Model {
260
260
  }
261
261
  }
262
262
 
263
- export class RunCommentGenerationRequest extends $tea.Model {
264
- /**
265
- * @example
266
- * 20
267
- */
268
- length?: string;
269
- /**
270
- * @example
271
- * 10
272
- */
273
- numComments?: string;
274
- sourceMaterial?: string;
275
- style?: string;
276
- static names(): { [key: string]: string } {
277
- return {
278
- length: 'length',
279
- numComments: 'numComments',
280
- sourceMaterial: 'sourceMaterial',
281
- style: 'style',
282
- };
283
- }
284
-
285
- static types(): { [key: string]: any } {
286
- return {
287
- length: 'string',
288
- numComments: 'string',
289
- sourceMaterial: 'string',
290
- style: 'string',
291
- };
292
- }
293
-
294
- constructor(map?: { [key: string]: any }) {
295
- super(map);
296
- }
297
- }
298
-
299
- export class RunCommentGenerationResponseBody extends $tea.Model {
300
- end?: boolean;
301
- header?: RunCommentGenerationResponseBodyHeader;
302
- payload?: RunCommentGenerationResponseBodyPayload;
303
- static names(): { [key: string]: string } {
304
- return {
305
- end: 'end',
306
- header: 'header',
307
- payload: 'payload',
308
- };
309
- }
310
-
311
- static types(): { [key: string]: any } {
312
- return {
313
- end: 'boolean',
314
- header: RunCommentGenerationResponseBodyHeader,
315
- payload: RunCommentGenerationResponseBodyPayload,
316
- };
317
- }
318
-
319
- constructor(map?: { [key: string]: any }) {
320
- super(map);
321
- }
322
- }
323
-
324
- export class RunCommentGenerationResponse extends $tea.Model {
325
- headers?: { [key: string]: string };
326
- statusCode?: number;
327
- body?: RunCommentGenerationResponseBody;
328
- static names(): { [key: string]: string } {
329
- return {
330
- headers: 'headers',
331
- statusCode: 'statusCode',
332
- body: 'body',
333
- };
334
- }
335
-
336
- static types(): { [key: string]: any } {
337
- return {
338
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
339
- statusCode: 'number',
340
- body: RunCommentGenerationResponseBody,
341
- };
342
- }
343
-
344
- constructor(map?: { [key: string]: any }) {
345
- super(map);
346
- }
347
- }
348
-
349
263
  export class RunHotTopicChatRequest extends $tea.Model {
350
264
  category?: string;
351
265
  generateOptions?: string[];
@@ -360,6 +274,7 @@ export class RunHotTopicChatRequest extends $tea.Model {
360
274
  * 1
361
275
  */
362
276
  imageCount?: number;
277
+ messages?: RunHotTopicChatRequestMessages[];
363
278
  /**
364
279
  * @example
365
280
  * xx
@@ -389,6 +304,7 @@ export class RunHotTopicChatRequest extends $tea.Model {
389
304
  hotTopicVersion: 'hotTopicVersion',
390
305
  hotTopics: 'hotTopics',
391
306
  imageCount: 'imageCount',
307
+ messages: 'messages',
392
308
  modelCustomPromptTemplate: 'modelCustomPromptTemplate',
393
309
  modelId: 'modelId',
394
310
  originalSessionId: 'originalSessionId',
@@ -405,6 +321,7 @@ export class RunHotTopicChatRequest extends $tea.Model {
405
321
  hotTopicVersion: 'string',
406
322
  hotTopics: { 'type': 'array', 'itemType': 'string' },
407
323
  imageCount: 'number',
324
+ messages: { 'type': 'array', 'itemType': RunHotTopicChatRequestMessages },
408
325
  modelCustomPromptTemplate: 'string',
409
326
  modelId: 'string',
410
327
  originalSessionId: 'string',
@@ -433,6 +350,7 @@ export class RunHotTopicChatShrinkRequest extends $tea.Model {
433
350
  * 1
434
351
  */
435
352
  imageCount?: number;
353
+ messagesShrink?: string;
436
354
  /**
437
355
  * @example
438
356
  * xx
@@ -462,6 +380,7 @@ export class RunHotTopicChatShrinkRequest extends $tea.Model {
462
380
  hotTopicVersion: 'hotTopicVersion',
463
381
  hotTopicsShrink: 'hotTopics',
464
382
  imageCount: 'imageCount',
383
+ messagesShrink: 'messages',
465
384
  modelCustomPromptTemplate: 'modelCustomPromptTemplate',
466
385
  modelId: 'modelId',
467
386
  originalSessionId: 'originalSessionId',
@@ -478,6 +397,7 @@ export class RunHotTopicChatShrinkRequest extends $tea.Model {
478
397
  hotTopicVersion: 'string',
479
398
  hotTopicsShrink: 'string',
480
399
  imageCount: 'number',
400
+ messagesShrink: 'string',
481
401
  modelCustomPromptTemplate: 'string',
482
402
  modelId: 'string',
483
403
  originalSessionId: 'string',
@@ -1777,130 +1697,35 @@ export class ListHotTopicSummariesResponseBodyData extends $tea.Model {
1777
1697
  }
1778
1698
  }
1779
1699
 
1780
- export class RunCommentGenerationResponseBodyHeader extends $tea.Model {
1700
+ export class RunHotTopicChatRequestMessages extends $tea.Model {
1781
1701
  /**
1782
1702
  * @example
1783
- * result-generated
1784
- */
1785
- event?: string;
1786
- eventInfo?: string;
1787
- /**
1788
- * @example
1789
- * F8A35034-EDCF-5C50-95A5-1044316F36E3
1790
- */
1791
- requestId?: string;
1792
- /**
1793
- * @example
1794
- * tcm9xac9dsfbfgm8hf5k94l3cqybwh9o3mn0iuyytdgd9qoejxf1crxsdvuvr8fu0zuhbe8anhdaoeif2wbkmebagnezh23cuhkiazx2tmjh4eml791eak7t95sshvtkz14bh2lnbktzvdhialzd8reoaem0pktw41slinwyoabe75xlnxsqb5eo1i6ly70
1795
- */
1796
- sessionId?: string;
1797
- /**
1798
- * @example
1799
- * task-fu1918oghtodbis3chgpfr
1800
- */
1801
- taskId?: string;
1802
- /**
1803
- * @example
1804
- * 21507c3517074446017046500ed5f1
1805
- */
1806
- traceId?: string;
1807
- static names(): { [key: string]: string } {
1808
- return {
1809
- event: 'event',
1810
- eventInfo: 'eventInfo',
1811
- requestId: 'requestId',
1812
- sessionId: 'sessionId',
1813
- taskId: 'taskId',
1814
- traceId: 'traceId',
1815
- };
1816
- }
1817
-
1818
- static types(): { [key: string]: any } {
1819
- return {
1820
- event: 'string',
1821
- eventInfo: 'string',
1822
- requestId: 'string',
1823
- sessionId: 'string',
1824
- taskId: 'string',
1825
- traceId: 'string',
1826
- };
1827
- }
1828
-
1829
- constructor(map?: { [key: string]: any }) {
1830
- super(map);
1831
- }
1832
- }
1833
-
1834
- export class RunCommentGenerationResponseBodyPayloadOutput extends $tea.Model {
1835
- text?: string;
1836
- static names(): { [key: string]: string } {
1837
- return {
1838
- text: 'text',
1839
- };
1840
- }
1841
-
1842
- static types(): { [key: string]: any } {
1843
- return {
1844
- text: 'string',
1845
- };
1846
- }
1847
-
1848
- constructor(map?: { [key: string]: any }) {
1849
- super(map);
1850
- }
1851
- }
1852
-
1853
- export class RunCommentGenerationResponseBodyPayloadUsage extends $tea.Model {
1854
- /**
1855
- * @example
1856
- * 100
1703
+ * xxx
1857
1704
  */
1858
- inputTokens?: number;
1705
+ content?: string;
1859
1706
  /**
1860
1707
  * @example
1861
- * 100
1708
+ * 2024-12-10 18:51:29
1862
1709
  */
1863
- outputTokens?: number;
1710
+ createTime?: string;
1864
1711
  /**
1865
1712
  * @example
1866
- * 200
1713
+ * user
1867
1714
  */
1868
- totalTokens?: number;
1715
+ role?: string;
1869
1716
  static names(): { [key: string]: string } {
1870
1717
  return {
1871
- inputTokens: 'inputTokens',
1872
- outputTokens: 'outputTokens',
1873
- totalTokens: 'totalTokens',
1874
- };
1875
- }
1876
-
1877
- static types(): { [key: string]: any } {
1878
- return {
1879
- inputTokens: 'number',
1880
- outputTokens: 'number',
1881
- totalTokens: 'number',
1882
- };
1883
- }
1884
-
1885
- constructor(map?: { [key: string]: any }) {
1886
- super(map);
1887
- }
1888
- }
1889
-
1890
- export class RunCommentGenerationResponseBodyPayload extends $tea.Model {
1891
- output?: RunCommentGenerationResponseBodyPayloadOutput;
1892
- usage?: RunCommentGenerationResponseBodyPayloadUsage;
1893
- static names(): { [key: string]: string } {
1894
- return {
1895
- output: 'output',
1896
- usage: 'usage',
1718
+ content: 'content',
1719
+ createTime: 'createTime',
1720
+ role: 'role',
1897
1721
  };
1898
1722
  }
1899
1723
 
1900
1724
  static types(): { [key: string]: any } {
1901
1725
  return {
1902
- output: RunCommentGenerationResponseBodyPayloadOutput,
1903
- usage: RunCommentGenerationResponseBodyPayloadUsage,
1726
+ content: 'string',
1727
+ createTime: 'string',
1728
+ role: 'string',
1904
1729
  };
1905
1730
  }
1906
1731
 
@@ -2093,12 +1918,70 @@ export class RunHotTopicChatResponseBodyPayloadOutputArticles extends $tea.Model
2093
1918
  }
2094
1919
  }
2095
1920
 
1921
+ export class RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesImages extends $tea.Model {
1922
+ /**
1923
+ * @example
1924
+ * http://xxx
1925
+ */
1926
+ url?: string;
1927
+ static names(): { [key: string]: string } {
1928
+ return {
1929
+ url: 'url',
1930
+ };
1931
+ }
1932
+
1933
+ static types(): { [key: string]: any } {
1934
+ return {
1935
+ url: 'string',
1936
+ };
1937
+ }
1938
+
1939
+ constructor(map?: { [key: string]: any }) {
1940
+ super(map);
1941
+ }
1942
+ }
1943
+
1944
+ export class RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesNews extends $tea.Model {
1945
+ /**
1946
+ * @example
1947
+ * xxx
1948
+ */
1949
+ title?: string;
1950
+ /**
1951
+ * @example
1952
+ * http://xxx
1953
+ */
1954
+ url?: string;
1955
+ static names(): { [key: string]: string } {
1956
+ return {
1957
+ title: 'title',
1958
+ url: 'url',
1959
+ };
1960
+ }
1961
+
1962
+ static types(): { [key: string]: any } {
1963
+ return {
1964
+ title: 'string',
1965
+ url: 'string',
1966
+ };
1967
+ }
1968
+
1969
+ constructor(map?: { [key: string]: any }) {
1970
+ super(map);
1971
+ }
1972
+ }
1973
+
2096
1974
  export class RunHotTopicChatResponseBodyPayloadOutputHotTopicSummaries extends $tea.Model {
2097
1975
  /**
2098
1976
  * @example
2099
1977
  * 100000
2100
1978
  */
2101
1979
  customHotValue?: number;
1980
+ /**
1981
+ * @example
1982
+ * xxx
1983
+ */
1984
+ customTextSummary?: string;
2102
1985
  /**
2103
1986
  * @example
2104
1987
  * xx
@@ -2114,21 +1997,36 @@ export class RunHotTopicChatResponseBodyPayloadOutputHotTopicSummaries extends $
2114
1997
  * 100000
2115
1998
  */
2116
1999
  hotValue?: number;
2000
+ images?: RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesImages[];
2001
+ news?: RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesNews[];
2002
+ /**
2003
+ * @example
2004
+ * xxx
2005
+ */
2006
+ textSummary?: string;
2117
2007
  static names(): { [key: string]: string } {
2118
2008
  return {
2119
2009
  customHotValue: 'customHotValue',
2010
+ customTextSummary: 'customTextSummary',
2120
2011
  hotTopic: 'hotTopic',
2121
2012
  hotTopicVersion: 'hotTopicVersion',
2122
2013
  hotValue: 'hotValue',
2014
+ images: 'images',
2015
+ news: 'news',
2016
+ textSummary: 'textSummary',
2123
2017
  };
2124
2018
  }
2125
2019
 
2126
2020
  static types(): { [key: string]: any } {
2127
2021
  return {
2128
2022
  customHotValue: 'number',
2023
+ customTextSummary: 'string',
2129
2024
  hotTopic: 'string',
2130
2025
  hotTopicVersion: 'string',
2131
2026
  hotValue: 'number',
2027
+ images: { 'type': 'array', 'itemType': RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesImages },
2028
+ news: { 'type': 'array', 'itemType': RunHotTopicChatResponseBodyPayloadOutputHotTopicSummariesNews },
2029
+ textSummary: 'string',
2132
2030
  };
2133
2031
  }
2134
2032
 
@@ -3883,63 +3781,6 @@ export default class Client extends OpenApi {
3883
3781
  return await this.listHotTopicSummariesWithOptions(workspaceId, request, headers, runtime);
3884
3782
  }
3885
3783
 
3886
- /**
3887
- * 评论生成服务
3888
- *
3889
- * @param request - RunCommentGenerationRequest
3890
- * @param headers - map
3891
- * @param runtime - runtime options for this request RuntimeOptions
3892
- * @returns RunCommentGenerationResponse
3893
- */
3894
- async runCommentGenerationWithOptions(workspaceId: string, request: RunCommentGenerationRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RunCommentGenerationResponse> {
3895
- Util.validateModel(request);
3896
- let body : {[key: string ]: any} = { };
3897
- if (!Util.isUnset(request.length)) {
3898
- body["length"] = request.length;
3899
- }
3900
-
3901
- if (!Util.isUnset(request.numComments)) {
3902
- body["numComments"] = request.numComments;
3903
- }
3904
-
3905
- if (!Util.isUnset(request.sourceMaterial)) {
3906
- body["sourceMaterial"] = request.sourceMaterial;
3907
- }
3908
-
3909
- if (!Util.isUnset(request.style)) {
3910
- body["style"] = request.style;
3911
- }
3912
-
3913
- let req = new $OpenApi.OpenApiRequest({
3914
- headers: headers,
3915
- body: OpenApiUtil.parseToMap(body),
3916
- });
3917
- let params = new $OpenApi.Params({
3918
- action: "RunCommentGeneration",
3919
- version: "2024-08-01",
3920
- protocol: "HTTPS",
3921
- pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/quanmiao/lightapp/runCommentGeneration`,
3922
- method: "POST",
3923
- authType: "AK",
3924
- style: "ROA",
3925
- reqBodyType: "formData",
3926
- bodyType: "json",
3927
- });
3928
- return $tea.cast<RunCommentGenerationResponse>(await this.callApi(params, req, runtime), new RunCommentGenerationResponse({}));
3929
- }
3930
-
3931
- /**
3932
- * 评论生成服务
3933
- *
3934
- * @param request - RunCommentGenerationRequest
3935
- * @returns RunCommentGenerationResponse
3936
- */
3937
- async runCommentGeneration(workspaceId: string, request: RunCommentGenerationRequest): Promise<RunCommentGenerationResponse> {
3938
- let runtime = new $Util.RuntimeOptions({ });
3939
- let headers : {[key: string ]: string} = { };
3940
- return await this.runCommentGenerationWithOptions(workspaceId, request, headers, runtime);
3941
- }
3942
-
3943
3784
  /**
3944
3785
  * 轻应用-热点播报-问答
3945
3786
  *
@@ -3960,6 +3801,10 @@ export default class Client extends OpenApi {
3960
3801
  request.hotTopicsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.hotTopics, "hotTopics", "json");
3961
3802
  }
3962
3803
 
3804
+ if (!Util.isUnset(tmpReq.messages)) {
3805
+ request.messagesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.messages, "messages", "json");
3806
+ }
3807
+
3963
3808
  if (!Util.isUnset(tmpReq.stepForBroadcastContentConfig)) {
3964
3809
  request.stepForBroadcastContentConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.stepForBroadcastContentConfig, "stepForBroadcastContentConfig", "json");
3965
3810
  }
@@ -3985,6 +3830,10 @@ export default class Client extends OpenApi {
3985
3830
  body["imageCount"] = request.imageCount;
3986
3831
  }
3987
3832
 
3833
+ if (!Util.isUnset(request.messagesShrink)) {
3834
+ body["messages"] = request.messagesShrink;
3835
+ }
3836
+
3988
3837
  if (!Util.isUnset(request.modelCustomPromptTemplate)) {
3989
3838
  body["modelCustomPromptTemplate"] = request.modelCustomPromptTemplate;
3990
3839
  }