@alicloud/rdsai20250507 1.4.1 → 2.0.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 (165) hide show
  1. package/dist/client.d.ts +186 -0
  2. package/dist/client.js +629 -0
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/ChatMessagesRequest.d.ts +63 -0
  5. package/dist/models/ChatMessagesRequest.js +94 -0
  6. package/dist/models/ChatMessagesRequest.js.map +1 -0
  7. package/dist/models/ChatMessagesResponse.d.ts +19 -0
  8. package/dist/models/ChatMessagesResponse.js +69 -0
  9. package/dist/models/ChatMessagesResponse.js.map +1 -0
  10. package/dist/models/ChatMessagesResponseBody.d.ts +50 -0
  11. package/dist/models/ChatMessagesResponseBody.js +74 -0
  12. package/dist/models/ChatMessagesResponseBody.js.map +1 -0
  13. package/dist/models/ChatMessagesShrinkRequest.d.ts +29 -0
  14. package/dist/models/ChatMessagesShrinkRequest.js +64 -0
  15. package/dist/models/ChatMessagesShrinkRequest.js.map +1 -0
  16. package/dist/models/ChatMessagesTaskStopRequest.d.ts +21 -0
  17. package/dist/models/ChatMessagesTaskStopRequest.js +58 -0
  18. package/dist/models/ChatMessagesTaskStopRequest.js.map +1 -0
  19. package/dist/models/ChatMessagesTaskStopResponse.d.ts +19 -0
  20. package/dist/models/ChatMessagesTaskStopResponse.js +69 -0
  21. package/dist/models/ChatMessagesTaskStopResponse.js.map +1 -0
  22. package/dist/models/ChatMessagesTaskStopResponseBody.d.ts +23 -0
  23. package/dist/models/ChatMessagesTaskStopResponseBody.js +60 -0
  24. package/dist/models/ChatMessagesTaskStopResponseBody.js.map +1 -0
  25. package/dist/models/CreateAppInstanceRequest.d.ts +0 -2
  26. package/dist/models/CreateAppInstanceRequest.js +0 -2
  27. package/dist/models/CreateAppInstanceRequest.js.map +1 -1
  28. package/dist/models/CreateCustomAgentRequest.d.ts +25 -0
  29. package/dist/models/CreateCustomAgentRequest.js +67 -0
  30. package/dist/models/CreateCustomAgentRequest.js.map +1 -0
  31. package/dist/models/CreateCustomAgentResponse.d.ts +19 -0
  32. package/dist/models/CreateCustomAgentResponse.js +69 -0
  33. package/dist/models/CreateCustomAgentResponse.js.map +1 -0
  34. package/dist/models/CreateCustomAgentResponseBody.d.ts +39 -0
  35. package/dist/models/CreateCustomAgentResponseBody.js +73 -0
  36. package/dist/models/CreateCustomAgentResponseBody.js.map +1 -0
  37. package/dist/models/CreateCustomAgentShrinkRequest.d.ts +25 -0
  38. package/dist/models/CreateCustomAgentShrinkRequest.js +64 -0
  39. package/dist/models/CreateCustomAgentShrinkRequest.js.map +1 -0
  40. package/dist/models/DeleteCustomAgentRequest.d.ts +21 -0
  41. package/dist/models/DeleteCustomAgentRequest.js +58 -0
  42. package/dist/models/DeleteCustomAgentRequest.js.map +1 -0
  43. package/dist/models/DeleteCustomAgentResponse.d.ts +19 -0
  44. package/dist/models/DeleteCustomAgentResponse.js +69 -0
  45. package/dist/models/DeleteCustomAgentResponse.js.map +1 -0
  46. package/dist/models/DeleteCustomAgentResponseBody.d.ts +23 -0
  47. package/dist/models/DeleteCustomAgentResponseBody.js +60 -0
  48. package/dist/models/DeleteCustomAgentResponseBody.js.map +1 -0
  49. package/dist/models/DescribeEventsListRequest.d.ts +46 -0
  50. package/dist/models/DescribeEventsListRequest.js +68 -0
  51. package/dist/models/DescribeEventsListRequest.js.map +1 -0
  52. package/dist/models/DescribeEventsListResponse.d.ts +19 -0
  53. package/dist/models/DescribeEventsListResponse.js +69 -0
  54. package/dist/models/DescribeEventsListResponse.js.map +1 -0
  55. package/dist/models/DescribeEventsListResponseBody.d.ts +83 -0
  56. package/dist/models/DescribeEventsListResponseBody.js +107 -0
  57. package/dist/models/DescribeEventsListResponseBody.js.map +1 -0
  58. package/dist/models/GetConversationsRequest.d.ts +33 -0
  59. package/dist/models/GetConversationsRequest.js +64 -0
  60. package/dist/models/GetConversationsRequest.js.map +1 -0
  61. package/dist/models/GetConversationsResponse.d.ts +19 -0
  62. package/dist/models/GetConversationsResponse.js +69 -0
  63. package/dist/models/GetConversationsResponse.js.map +1 -0
  64. package/dist/models/GetConversationsResponseBody.d.ts +53 -0
  65. package/dist/models/GetConversationsResponseBody.js +92 -0
  66. package/dist/models/GetConversationsResponseBody.js.map +1 -0
  67. package/dist/models/GetCustomAgentRequest.d.ts +18 -0
  68. package/dist/models/GetCustomAgentRequest.js +58 -0
  69. package/dist/models/GetCustomAgentRequest.js.map +1 -0
  70. package/dist/models/GetCustomAgentResponse.d.ts +19 -0
  71. package/dist/models/GetCustomAgentResponse.js +69 -0
  72. package/dist/models/GetCustomAgentResponse.js.map +1 -0
  73. package/dist/models/GetCustomAgentResponseBody.d.ts +41 -0
  74. package/dist/models/GetCustomAgentResponseBody.js +75 -0
  75. package/dist/models/GetCustomAgentResponseBody.js.map +1 -0
  76. package/dist/models/GetMessagesRequest.d.ts +28 -0
  77. package/dist/models/GetMessagesRequest.js +62 -0
  78. package/dist/models/GetMessagesRequest.js.map +1 -0
  79. package/dist/models/GetMessagesResponse.d.ts +19 -0
  80. package/dist/models/GetMessagesResponse.js +69 -0
  81. package/dist/models/GetMessagesResponse.js.map +1 -0
  82. package/dist/models/GetMessagesResponseBody.d.ts +64 -0
  83. package/dist/models/GetMessagesResponseBody.js +101 -0
  84. package/dist/models/GetMessagesResponseBody.js.map +1 -0
  85. package/dist/models/ListCustomAgentRequest.d.ts +23 -0
  86. package/dist/models/ListCustomAgentRequest.js +60 -0
  87. package/dist/models/ListCustomAgentRequest.js.map +1 -0
  88. package/dist/models/ListCustomAgentResponse.d.ts +19 -0
  89. package/dist/models/ListCustomAgentResponse.js +69 -0
  90. package/dist/models/ListCustomAgentResponse.js.map +1 -0
  91. package/dist/models/ListCustomAgentResponseBody.d.ts +72 -0
  92. package/dist/models/ListCustomAgentResponseBody.js +103 -0
  93. package/dist/models/ListCustomAgentResponseBody.js.map +1 -0
  94. package/dist/models/ListCustomAgentToolsResponse.d.ts +19 -0
  95. package/dist/models/ListCustomAgentToolsResponse.js +69 -0
  96. package/dist/models/ListCustomAgentToolsResponse.js.map +1 -0
  97. package/dist/models/ListCustomAgentToolsResponseBody.d.ts +49 -0
  98. package/dist/models/ListCustomAgentToolsResponseBody.js +92 -0
  99. package/dist/models/ListCustomAgentToolsResponseBody.js.map +1 -0
  100. package/dist/models/ModifyMessagesFeedbacksRequest.d.ts +24 -0
  101. package/dist/models/ModifyMessagesFeedbacksRequest.js +62 -0
  102. package/dist/models/ModifyMessagesFeedbacksRequest.js.map +1 -0
  103. package/dist/models/ModifyMessagesFeedbacksResponse.d.ts +19 -0
  104. package/dist/models/ModifyMessagesFeedbacksResponse.js +69 -0
  105. package/dist/models/ModifyMessagesFeedbacksResponse.js.map +1 -0
  106. package/dist/models/ModifyMessagesFeedbacksResponseBody.d.ts +23 -0
  107. package/dist/models/ModifyMessagesFeedbacksResponseBody.js +60 -0
  108. package/dist/models/ModifyMessagesFeedbacksResponseBody.js.map +1 -0
  109. package/dist/models/UpdateCustomAgentRequest.d.ts +31 -0
  110. package/dist/models/UpdateCustomAgentRequest.js +69 -0
  111. package/dist/models/UpdateCustomAgentRequest.js.map +1 -0
  112. package/dist/models/UpdateCustomAgentResponse.d.ts +19 -0
  113. package/dist/models/UpdateCustomAgentResponse.js +69 -0
  114. package/dist/models/UpdateCustomAgentResponse.js.map +1 -0
  115. package/dist/models/UpdateCustomAgentResponseBody.d.ts +34 -0
  116. package/dist/models/UpdateCustomAgentResponseBody.js +71 -0
  117. package/dist/models/UpdateCustomAgentResponseBody.js.map +1 -0
  118. package/dist/models/UpdateCustomAgentShrinkRequest.d.ts +31 -0
  119. package/dist/models/UpdateCustomAgentShrinkRequest.js +66 -0
  120. package/dist/models/UpdateCustomAgentShrinkRequest.js.map +1 -0
  121. package/dist/models/model.d.ts +44 -0
  122. package/dist/models/model.js +91 -2
  123. package/dist/models/model.js.map +1 -1
  124. package/package.json +1 -1
  125. package/src/client.ts +666 -0
  126. package/src/models/ChatMessagesRequest.ts +101 -0
  127. package/src/models/ChatMessagesResponse.ts +40 -0
  128. package/src/models/ChatMessagesResponseBody.ts +79 -0
  129. package/src/models/ChatMessagesShrinkRequest.ts +48 -0
  130. package/src/models/ChatMessagesTaskStopRequest.ts +34 -0
  131. package/src/models/ChatMessagesTaskStopResponse.ts +40 -0
  132. package/src/models/ChatMessagesTaskStopResponseBody.ts +38 -0
  133. package/src/models/CreateAppInstanceRequest.ts +0 -2
  134. package/src/models/CreateCustomAgentRequest.ts +47 -0
  135. package/src/models/CreateCustomAgentResponse.ts +40 -0
  136. package/src/models/CreateCustomAgentResponseBody.ts +67 -0
  137. package/src/models/CreateCustomAgentShrinkRequest.ts +44 -0
  138. package/src/models/DeleteCustomAgentRequest.ts +34 -0
  139. package/src/models/DeleteCustomAgentResponse.ts +40 -0
  140. package/src/models/DeleteCustomAgentResponseBody.ts +38 -0
  141. package/src/models/DescribeEventsListRequest.ts +69 -0
  142. package/src/models/DescribeEventsListResponse.ts +40 -0
  143. package/src/models/DescribeEventsListResponseBody.ts +136 -0
  144. package/src/models/GetConversationsRequest.ts +52 -0
  145. package/src/models/GetConversationsResponse.ts +40 -0
  146. package/src/models/GetConversationsResponseBody.ts +91 -0
  147. package/src/models/GetCustomAgentRequest.ts +31 -0
  148. package/src/models/GetCustomAgentResponse.ts +40 -0
  149. package/src/models/GetCustomAgentResponseBody.ts +71 -0
  150. package/src/models/GetMessagesRequest.ts +45 -0
  151. package/src/models/GetMessagesResponse.ts +40 -0
  152. package/src/models/GetMessagesResponseBody.ts +111 -0
  153. package/src/models/ListCustomAgentRequest.ts +38 -0
  154. package/src/models/ListCustomAgentResponse.ts +40 -0
  155. package/src/models/ListCustomAgentResponseBody.ts +121 -0
  156. package/src/models/ListCustomAgentToolsResponse.ts +40 -0
  157. package/src/models/ListCustomAgentToolsResponseBody.ts +87 -0
  158. package/src/models/ModifyMessagesFeedbacksRequest.ts +41 -0
  159. package/src/models/ModifyMessagesFeedbacksResponse.ts +40 -0
  160. package/src/models/ModifyMessagesFeedbacksResponseBody.ts +38 -0
  161. package/src/models/UpdateCustomAgentRequest.ts +55 -0
  162. package/src/models/UpdateCustomAgentResponse.ts +40 -0
  163. package/src/models/UpdateCustomAgentResponseBody.ts +60 -0
  164. package/src/models/UpdateCustomAgentShrinkRequest.ts +52 -0
  165. package/src/models/model.ts +44 -0
package/src/client.ts CHANGED
@@ -29,6 +29,170 @@ export default class Client extends OpenApi {
29
29
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
30
30
  }
31
31
 
32
+ /**
33
+ * 发送对话消息
34
+ *
35
+ * @param tmpReq - ChatMessagesRequest
36
+ * @param runtime - runtime options for this request RuntimeOptions
37
+ * @returns ChatMessagesResponse
38
+ */
39
+ async *chatMessagesWithSSE(tmpReq: $_model.ChatMessagesRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.ChatMessagesResponse, any, unknown> {
40
+ tmpReq.validate();
41
+ let request = new $_model.ChatMessagesShrinkRequest({ });
42
+ OpenApiUtil.convert(tmpReq, request);
43
+ if (!$dara.isNull(tmpReq.inputs)) {
44
+ request.inputsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.inputs, "Inputs", "json");
45
+ }
46
+
47
+ let query = { };
48
+ if (!$dara.isNull(request.conversationId)) {
49
+ query["ConversationId"] = request.conversationId;
50
+ }
51
+
52
+ if (!$dara.isNull(request.inputsShrink)) {
53
+ query["Inputs"] = request.inputsShrink;
54
+ }
55
+
56
+ if (!$dara.isNull(request.parentMessageId)) {
57
+ query["ParentMessageId"] = request.parentMessageId;
58
+ }
59
+
60
+ if (!$dara.isNull(request.query)) {
61
+ query["Query"] = request.query;
62
+ }
63
+
64
+ let req = new $OpenApiUtil.OpenApiRequest({
65
+ query: OpenApiUtil.query(query),
66
+ });
67
+ let params = new $OpenApiUtil.Params({
68
+ action: "ChatMessages",
69
+ version: "2025-05-07",
70
+ protocol: "HTTPS",
71
+ pathname: "/",
72
+ method: "POST",
73
+ authType: "AK",
74
+ style: "RPC",
75
+ reqBodyType: "formData",
76
+ bodyType: "json",
77
+ });
78
+ let sseResp = await this.callSSEApi(params, req, runtime);
79
+
80
+ for await (let resp of sseResp) {
81
+ let data = JSON.parse(resp.event.data);
82
+ yield $dara.cast<$_model.ChatMessagesResponse>({
83
+ statusCode: resp.statusCode,
84
+ headers: resp.headers,
85
+ body: {
86
+ ...data,
87
+ RequestId: resp.event.id,
88
+ Message: resp.event.event,
89
+ },
90
+ }, new $_model.ChatMessagesResponse({}));
91
+ }
92
+ }
93
+
94
+ /**
95
+ * 发送对话消息
96
+ *
97
+ * @param tmpReq - ChatMessagesRequest
98
+ * @param runtime - runtime options for this request RuntimeOptions
99
+ * @returns ChatMessagesResponse
100
+ */
101
+ async chatMessagesWithOptions(tmpReq: $_model.ChatMessagesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ChatMessagesResponse> {
102
+ tmpReq.validate();
103
+ let request = new $_model.ChatMessagesShrinkRequest({ });
104
+ OpenApiUtil.convert(tmpReq, request);
105
+ if (!$dara.isNull(tmpReq.inputs)) {
106
+ request.inputsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.inputs, "Inputs", "json");
107
+ }
108
+
109
+ let query = { };
110
+ if (!$dara.isNull(request.conversationId)) {
111
+ query["ConversationId"] = request.conversationId;
112
+ }
113
+
114
+ if (!$dara.isNull(request.inputsShrink)) {
115
+ query["Inputs"] = request.inputsShrink;
116
+ }
117
+
118
+ if (!$dara.isNull(request.parentMessageId)) {
119
+ query["ParentMessageId"] = request.parentMessageId;
120
+ }
121
+
122
+ if (!$dara.isNull(request.query)) {
123
+ query["Query"] = request.query;
124
+ }
125
+
126
+ let req = new $OpenApiUtil.OpenApiRequest({
127
+ query: OpenApiUtil.query(query),
128
+ });
129
+ let params = new $OpenApiUtil.Params({
130
+ action: "ChatMessages",
131
+ version: "2025-05-07",
132
+ protocol: "HTTPS",
133
+ pathname: "/",
134
+ method: "POST",
135
+ authType: "AK",
136
+ style: "RPC",
137
+ reqBodyType: "formData",
138
+ bodyType: "json",
139
+ });
140
+ return $dara.cast<$_model.ChatMessagesResponse>(await this.callApi(params, req, runtime), new $_model.ChatMessagesResponse({}));
141
+ }
142
+
143
+ /**
144
+ * 发送对话消息
145
+ *
146
+ * @param request - ChatMessagesRequest
147
+ * @returns ChatMessagesResponse
148
+ */
149
+ async chatMessages(request: $_model.ChatMessagesRequest): Promise<$_model.ChatMessagesResponse> {
150
+ let runtime = new $dara.RuntimeOptions({ });
151
+ return await this.chatMessagesWithOptions(request, runtime);
152
+ }
153
+
154
+ /**
155
+ * 停止对话
156
+ *
157
+ * @param request - ChatMessagesTaskStopRequest
158
+ * @param runtime - runtime options for this request RuntimeOptions
159
+ * @returns ChatMessagesTaskStopResponse
160
+ */
161
+ async chatMessagesTaskStopWithOptions(request: $_model.ChatMessagesTaskStopRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ChatMessagesTaskStopResponse> {
162
+ request.validate();
163
+ let query = { };
164
+ if (!$dara.isNull(request.taskId)) {
165
+ query["TaskId"] = request.taskId;
166
+ }
167
+
168
+ let req = new $OpenApiUtil.OpenApiRequest({
169
+ query: OpenApiUtil.query(query),
170
+ });
171
+ let params = new $OpenApiUtil.Params({
172
+ action: "ChatMessagesTaskStop",
173
+ version: "2025-05-07",
174
+ protocol: "HTTPS",
175
+ pathname: "/",
176
+ method: "POST",
177
+ authType: "AK",
178
+ style: "RPC",
179
+ reqBodyType: "formData",
180
+ bodyType: "json",
181
+ });
182
+ return $dara.cast<$_model.ChatMessagesTaskStopResponse>(await this.callApi(params, req, runtime), new $_model.ChatMessagesTaskStopResponse({}));
183
+ }
184
+
185
+ /**
186
+ * 停止对话
187
+ *
188
+ * @param request - ChatMessagesTaskStopRequest
189
+ * @returns ChatMessagesTaskStopResponse
190
+ */
191
+ async chatMessagesTaskStop(request: $_model.ChatMessagesTaskStopRequest): Promise<$_model.ChatMessagesTaskStopResponse> {
192
+ let runtime = new $dara.RuntimeOptions({ });
193
+ return await this.chatMessagesTaskStopWithOptions(request, runtime);
194
+ }
195
+
32
196
  /**
33
197
  * 创建应用服务实例
34
198
  *
@@ -129,6 +293,66 @@ export default class Client extends OpenApi {
129
293
  return await this.createAppInstanceWithOptions(request, runtime);
130
294
  }
131
295
 
296
+ /**
297
+ * 创建自定义agent
298
+ *
299
+ * @param tmpReq - CreateCustomAgentRequest
300
+ * @param runtime - runtime options for this request RuntimeOptions
301
+ * @returns CreateCustomAgentResponse
302
+ */
303
+ async createCustomAgentWithOptions(tmpReq: $_model.CreateCustomAgentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateCustomAgentResponse> {
304
+ tmpReq.validate();
305
+ let request = new $_model.CreateCustomAgentShrinkRequest({ });
306
+ OpenApiUtil.convert(tmpReq, request);
307
+ if (!$dara.isNull(tmpReq.tools)) {
308
+ request.toolsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tools, "Tools", "json");
309
+ }
310
+
311
+ let query = { };
312
+ if (!$dara.isNull(request.enableTools)) {
313
+ query["EnableTools"] = request.enableTools;
314
+ }
315
+
316
+ if (!$dara.isNull(request.name)) {
317
+ query["Name"] = request.name;
318
+ }
319
+
320
+ if (!$dara.isNull(request.systemPrompt)) {
321
+ query["SystemPrompt"] = request.systemPrompt;
322
+ }
323
+
324
+ if (!$dara.isNull(request.toolsShrink)) {
325
+ query["Tools"] = request.toolsShrink;
326
+ }
327
+
328
+ let req = new $OpenApiUtil.OpenApiRequest({
329
+ query: OpenApiUtil.query(query),
330
+ });
331
+ let params = new $OpenApiUtil.Params({
332
+ action: "CreateCustomAgent",
333
+ version: "2025-05-07",
334
+ protocol: "HTTPS",
335
+ pathname: "/",
336
+ method: "POST",
337
+ authType: "AK",
338
+ style: "RPC",
339
+ reqBodyType: "formData",
340
+ bodyType: "json",
341
+ });
342
+ return $dara.cast<$_model.CreateCustomAgentResponse>(await this.callApi(params, req, runtime), new $_model.CreateCustomAgentResponse({}));
343
+ }
344
+
345
+ /**
346
+ * 创建自定义agent
347
+ *
348
+ * @param request - CreateCustomAgentRequest
349
+ * @returns CreateCustomAgentResponse
350
+ */
351
+ async createCustomAgent(request: $_model.CreateCustomAgentRequest): Promise<$_model.CreateCustomAgentResponse> {
352
+ let runtime = new $dara.RuntimeOptions({ });
353
+ return await this.createCustomAgentWithOptions(request, runtime);
354
+ }
355
+
132
356
  /**
133
357
  * 删除应用服务实例
134
358
  *
@@ -179,6 +403,48 @@ export default class Client extends OpenApi {
179
403
  return await this.deleteAppInstanceWithOptions(request, runtime);
180
404
  }
181
405
 
406
+ /**
407
+ * 删除Custom Agent
408
+ *
409
+ * @param request - DeleteCustomAgentRequest
410
+ * @param runtime - runtime options for this request RuntimeOptions
411
+ * @returns DeleteCustomAgentResponse
412
+ */
413
+ async deleteCustomAgentWithOptions(request: $_model.DeleteCustomAgentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteCustomAgentResponse> {
414
+ request.validate();
415
+ let query = { };
416
+ if (!$dara.isNull(request.customAgentId)) {
417
+ query["CustomAgentId"] = request.customAgentId;
418
+ }
419
+
420
+ let req = new $OpenApiUtil.OpenApiRequest({
421
+ query: OpenApiUtil.query(query),
422
+ });
423
+ let params = new $OpenApiUtil.Params({
424
+ action: "DeleteCustomAgent",
425
+ version: "2025-05-07",
426
+ protocol: "HTTPS",
427
+ pathname: "/",
428
+ method: "POST",
429
+ authType: "AK",
430
+ style: "RPC",
431
+ reqBodyType: "formData",
432
+ bodyType: "json",
433
+ });
434
+ return $dara.cast<$_model.DeleteCustomAgentResponse>(await this.callApi(params, req, runtime), new $_model.DeleteCustomAgentResponse({}));
435
+ }
436
+
437
+ /**
438
+ * 删除Custom Agent
439
+ *
440
+ * @param request - DeleteCustomAgentRequest
441
+ * @returns DeleteCustomAgentResponse
442
+ */
443
+ async deleteCustomAgent(request: $_model.DeleteCustomAgentRequest): Promise<$_model.DeleteCustomAgentResponse> {
444
+ let runtime = new $dara.RuntimeOptions({ });
445
+ return await this.deleteCustomAgentWithOptions(request, runtime);
446
+ }
447
+
182
448
  /**
183
449
  * 查询应用服务详情
184
450
  *
@@ -283,6 +549,68 @@ export default class Client extends OpenApi {
283
549
  return await this.describeAppInstancesWithOptions(request, runtime);
284
550
  }
285
551
 
552
+ /**
553
+ * 查询事件信息列表
554
+ *
555
+ * @param request - DescribeEventsListRequest
556
+ * @param runtime - runtime options for this request RuntimeOptions
557
+ * @returns DescribeEventsListResponse
558
+ */
559
+ async describeEventsListWithOptions(request: $_model.DescribeEventsListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeEventsListResponse> {
560
+ request.validate();
561
+ let query = { };
562
+ if (!$dara.isNull(request.endTime)) {
563
+ query["EndTime"] = request.endTime;
564
+ }
565
+
566
+ if (!$dara.isNull(request.instanceIdList)) {
567
+ query["InstanceIdList"] = request.instanceIdList;
568
+ }
569
+
570
+ if (!$dara.isNull(request.pageNumber)) {
571
+ query["PageNumber"] = request.pageNumber;
572
+ }
573
+
574
+ if (!$dara.isNull(request.pageSize)) {
575
+ query["PageSize"] = request.pageSize;
576
+ }
577
+
578
+ if (!$dara.isNull(request.regionId)) {
579
+ query["RegionId"] = request.regionId;
580
+ }
581
+
582
+ if (!$dara.isNull(request.startTime)) {
583
+ query["StartTime"] = request.startTime;
584
+ }
585
+
586
+ let req = new $OpenApiUtil.OpenApiRequest({
587
+ query: OpenApiUtil.query(query),
588
+ });
589
+ let params = new $OpenApiUtil.Params({
590
+ action: "DescribeEventsList",
591
+ version: "2025-05-07",
592
+ protocol: "HTTPS",
593
+ pathname: "/",
594
+ method: "POST",
595
+ authType: "AK",
596
+ style: "RPC",
597
+ reqBodyType: "formData",
598
+ bodyType: "json",
599
+ });
600
+ return $dara.cast<$_model.DescribeEventsListResponse>(await this.callApi(params, req, runtime), new $_model.DescribeEventsListResponse({}));
601
+ }
602
+
603
+ /**
604
+ * 查询事件信息列表
605
+ *
606
+ * @param request - DescribeEventsListRequest
607
+ * @returns DescribeEventsListResponse
608
+ */
609
+ async describeEventsList(request: $_model.DescribeEventsListRequest): Promise<$_model.DescribeEventsListResponse> {
610
+ let runtime = new $dara.RuntimeOptions({ });
611
+ return await this.describeEventsListWithOptions(request, runtime);
612
+ }
613
+
286
614
  /**
287
615
  * 查看实例认证信息
288
616
  *
@@ -559,6 +887,230 @@ export default class Client extends OpenApi {
559
887
  return await this.describeInstanceStorageConfigWithOptions(request, runtime);
560
888
  }
561
889
 
890
+ /**
891
+ * 获取会话列表
892
+ *
893
+ * @param request - GetConversationsRequest
894
+ * @param runtime - runtime options for this request RuntimeOptions
895
+ * @returns GetConversationsResponse
896
+ */
897
+ async getConversationsWithOptions(request: $_model.GetConversationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetConversationsResponse> {
898
+ request.validate();
899
+ let query = { };
900
+ if (!$dara.isNull(request.lastId)) {
901
+ query["LastId"] = request.lastId;
902
+ }
903
+
904
+ if (!$dara.isNull(request.limit)) {
905
+ query["Limit"] = request.limit;
906
+ }
907
+
908
+ if (!$dara.isNull(request.pinned)) {
909
+ query["Pinned"] = request.pinned;
910
+ }
911
+
912
+ if (!$dara.isNull(request.sortBy)) {
913
+ query["SortBy"] = request.sortBy;
914
+ }
915
+
916
+ let req = new $OpenApiUtil.OpenApiRequest({
917
+ query: OpenApiUtil.query(query),
918
+ });
919
+ let params = new $OpenApiUtil.Params({
920
+ action: "GetConversations",
921
+ version: "2025-05-07",
922
+ protocol: "HTTPS",
923
+ pathname: "/",
924
+ method: "POST",
925
+ authType: "AK",
926
+ style: "RPC",
927
+ reqBodyType: "formData",
928
+ bodyType: "json",
929
+ });
930
+ return $dara.cast<$_model.GetConversationsResponse>(await this.callApi(params, req, runtime), new $_model.GetConversationsResponse({}));
931
+ }
932
+
933
+ /**
934
+ * 获取会话列表
935
+ *
936
+ * @param request - GetConversationsRequest
937
+ * @returns GetConversationsResponse
938
+ */
939
+ async getConversations(request: $_model.GetConversationsRequest): Promise<$_model.GetConversationsResponse> {
940
+ let runtime = new $dara.RuntimeOptions({ });
941
+ return await this.getConversationsWithOptions(request, runtime);
942
+ }
943
+
944
+ /**
945
+ * 查询CustomAgent
946
+ *
947
+ * @param request - GetCustomAgentRequest
948
+ * @param runtime - runtime options for this request RuntimeOptions
949
+ * @returns GetCustomAgentResponse
950
+ */
951
+ async getCustomAgentWithOptions(request: $_model.GetCustomAgentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetCustomAgentResponse> {
952
+ request.validate();
953
+ let query = { };
954
+ if (!$dara.isNull(request.customAgentId)) {
955
+ query["CustomAgentId"] = request.customAgentId;
956
+ }
957
+
958
+ let req = new $OpenApiUtil.OpenApiRequest({
959
+ query: OpenApiUtil.query(query),
960
+ });
961
+ let params = new $OpenApiUtil.Params({
962
+ action: "GetCustomAgent",
963
+ version: "2025-05-07",
964
+ protocol: "HTTPS",
965
+ pathname: "/",
966
+ method: "POST",
967
+ authType: "AK",
968
+ style: "RPC",
969
+ reqBodyType: "formData",
970
+ bodyType: "json",
971
+ });
972
+ return $dara.cast<$_model.GetCustomAgentResponse>(await this.callApi(params, req, runtime), new $_model.GetCustomAgentResponse({}));
973
+ }
974
+
975
+ /**
976
+ * 查询CustomAgent
977
+ *
978
+ * @param request - GetCustomAgentRequest
979
+ * @returns GetCustomAgentResponse
980
+ */
981
+ async getCustomAgent(request: $_model.GetCustomAgentRequest): Promise<$_model.GetCustomAgentResponse> {
982
+ let runtime = new $dara.RuntimeOptions({ });
983
+ return await this.getCustomAgentWithOptions(request, runtime);
984
+ }
985
+
986
+ /**
987
+ * 获取会话历史消息
988
+ *
989
+ * @param request - GetMessagesRequest
990
+ * @param runtime - runtime options for this request RuntimeOptions
991
+ * @returns GetMessagesResponse
992
+ */
993
+ async getMessagesWithOptions(request: $_model.GetMessagesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetMessagesResponse> {
994
+ request.validate();
995
+ let query = { };
996
+ if (!$dara.isNull(request.conversationId)) {
997
+ query["ConversationId"] = request.conversationId;
998
+ }
999
+
1000
+ if (!$dara.isNull(request.firstId)) {
1001
+ query["FirstId"] = request.firstId;
1002
+ }
1003
+
1004
+ if (!$dara.isNull(request.limit)) {
1005
+ query["Limit"] = request.limit;
1006
+ }
1007
+
1008
+ let req = new $OpenApiUtil.OpenApiRequest({
1009
+ query: OpenApiUtil.query(query),
1010
+ });
1011
+ let params = new $OpenApiUtil.Params({
1012
+ action: "GetMessages",
1013
+ version: "2025-05-07",
1014
+ protocol: "HTTPS",
1015
+ pathname: "/",
1016
+ method: "POST",
1017
+ authType: "AK",
1018
+ style: "RPC",
1019
+ reqBodyType: "formData",
1020
+ bodyType: "json",
1021
+ });
1022
+ return $dara.cast<$_model.GetMessagesResponse>(await this.callApi(params, req, runtime), new $_model.GetMessagesResponse({}));
1023
+ }
1024
+
1025
+ /**
1026
+ * 获取会话历史消息
1027
+ *
1028
+ * @param request - GetMessagesRequest
1029
+ * @returns GetMessagesResponse
1030
+ */
1031
+ async getMessages(request: $_model.GetMessagesRequest): Promise<$_model.GetMessagesResponse> {
1032
+ let runtime = new $dara.RuntimeOptions({ });
1033
+ return await this.getMessagesWithOptions(request, runtime);
1034
+ }
1035
+
1036
+ /**
1037
+ * 获取Custom Agent列表
1038
+ *
1039
+ * @param request - ListCustomAgentRequest
1040
+ * @param runtime - runtime options for this request RuntimeOptions
1041
+ * @returns ListCustomAgentResponse
1042
+ */
1043
+ async listCustomAgentWithOptions(request: $_model.ListCustomAgentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListCustomAgentResponse> {
1044
+ request.validate();
1045
+ let query = { };
1046
+ if (!$dara.isNull(request.pageNumber)) {
1047
+ query["PageNumber"] = request.pageNumber;
1048
+ }
1049
+
1050
+ if (!$dara.isNull(request.pageSize)) {
1051
+ query["PageSize"] = request.pageSize;
1052
+ }
1053
+
1054
+ let req = new $OpenApiUtil.OpenApiRequest({
1055
+ query: OpenApiUtil.query(query),
1056
+ });
1057
+ let params = new $OpenApiUtil.Params({
1058
+ action: "ListCustomAgent",
1059
+ version: "2025-05-07",
1060
+ protocol: "HTTPS",
1061
+ pathname: "/",
1062
+ method: "POST",
1063
+ authType: "AK",
1064
+ style: "RPC",
1065
+ reqBodyType: "formData",
1066
+ bodyType: "json",
1067
+ });
1068
+ return $dara.cast<$_model.ListCustomAgentResponse>(await this.callApi(params, req, runtime), new $_model.ListCustomAgentResponse({}));
1069
+ }
1070
+
1071
+ /**
1072
+ * 获取Custom Agent列表
1073
+ *
1074
+ * @param request - ListCustomAgentRequest
1075
+ * @returns ListCustomAgentResponse
1076
+ */
1077
+ async listCustomAgent(request: $_model.ListCustomAgentRequest): Promise<$_model.ListCustomAgentResponse> {
1078
+ let runtime = new $dara.RuntimeOptions({ });
1079
+ return await this.listCustomAgentWithOptions(request, runtime);
1080
+ }
1081
+
1082
+ /**
1083
+ * 获取专属Agent可用工具
1084
+ *
1085
+ * @param request - ListCustomAgentToolsRequest
1086
+ * @param runtime - runtime options for this request RuntimeOptions
1087
+ * @returns ListCustomAgentToolsResponse
1088
+ */
1089
+ async listCustomAgentToolsWithOptions(runtime: $dara.RuntimeOptions): Promise<$_model.ListCustomAgentToolsResponse> {
1090
+ let req = new $OpenApiUtil.OpenApiRequest({ });
1091
+ let params = new $OpenApiUtil.Params({
1092
+ action: "ListCustomAgentTools",
1093
+ version: "2025-05-07",
1094
+ protocol: "HTTPS",
1095
+ pathname: "/",
1096
+ method: "POST",
1097
+ authType: "AK",
1098
+ style: "RPC",
1099
+ reqBodyType: "formData",
1100
+ bodyType: "json",
1101
+ });
1102
+ return $dara.cast<$_model.ListCustomAgentToolsResponse>(await this.callApi(params, req, runtime), new $_model.ListCustomAgentToolsResponse({}));
1103
+ }
1104
+
1105
+ /**
1106
+ * 获取专属Agent可用工具
1107
+ * @returns ListCustomAgentToolsResponse
1108
+ */
1109
+ async listCustomAgentTools(): Promise<$_model.ListCustomAgentToolsResponse> {
1110
+ let runtime = new $dara.RuntimeOptions({ });
1111
+ return await this.listCustomAgentToolsWithOptions(runtime);
1112
+ }
1113
+
562
1114
  /**
563
1115
  * 修改Supabase Auth相关配置
564
1116
  *
@@ -921,6 +1473,56 @@ export default class Client extends OpenApi {
921
1473
  return await this.modifyInstanceStorageConfigWithOptions(request, runtime);
922
1474
  }
923
1475
 
1476
+ /**
1477
+ * 消息终端用户反馈、点赞/点踩
1478
+ *
1479
+ * @param request - ModifyMessagesFeedbacksRequest
1480
+ * @param runtime - runtime options for this request RuntimeOptions
1481
+ * @returns ModifyMessagesFeedbacksResponse
1482
+ */
1483
+ async modifyMessagesFeedbacksWithOptions(request: $_model.ModifyMessagesFeedbacksRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyMessagesFeedbacksResponse> {
1484
+ request.validate();
1485
+ let query = { };
1486
+ if (!$dara.isNull(request.content)) {
1487
+ query["Content"] = request.content;
1488
+ }
1489
+
1490
+ if (!$dara.isNull(request.messageId)) {
1491
+ query["MessageId"] = request.messageId;
1492
+ }
1493
+
1494
+ if (!$dara.isNull(request.rating)) {
1495
+ query["Rating"] = request.rating;
1496
+ }
1497
+
1498
+ let req = new $OpenApiUtil.OpenApiRequest({
1499
+ query: OpenApiUtil.query(query),
1500
+ });
1501
+ let params = new $OpenApiUtil.Params({
1502
+ action: "ModifyMessagesFeedbacks",
1503
+ version: "2025-05-07",
1504
+ protocol: "HTTPS",
1505
+ pathname: "/",
1506
+ method: "POST",
1507
+ authType: "AK",
1508
+ style: "RPC",
1509
+ reqBodyType: "formData",
1510
+ bodyType: "json",
1511
+ });
1512
+ return $dara.cast<$_model.ModifyMessagesFeedbacksResponse>(await this.callApi(params, req, runtime), new $_model.ModifyMessagesFeedbacksResponse({}));
1513
+ }
1514
+
1515
+ /**
1516
+ * 消息终端用户反馈、点赞/点踩
1517
+ *
1518
+ * @param request - ModifyMessagesFeedbacksRequest
1519
+ * @returns ModifyMessagesFeedbacksResponse
1520
+ */
1521
+ async modifyMessagesFeedbacks(request: $_model.ModifyMessagesFeedbacksRequest): Promise<$_model.ModifyMessagesFeedbacksResponse> {
1522
+ let runtime = new $dara.RuntimeOptions({ });
1523
+ return await this.modifyMessagesFeedbacksWithOptions(request, runtime);
1524
+ }
1525
+
924
1526
  /**
925
1527
  * 重置实例密码
926
1528
  *
@@ -1113,4 +1715,68 @@ export default class Client extends OpenApi {
1113
1715
  return await this.stopInstanceWithOptions(request, runtime);
1114
1716
  }
1115
1717
 
1718
+ /**
1719
+ * 更新Custom Agent
1720
+ *
1721
+ * @param tmpReq - UpdateCustomAgentRequest
1722
+ * @param runtime - runtime options for this request RuntimeOptions
1723
+ * @returns UpdateCustomAgentResponse
1724
+ */
1725
+ async updateCustomAgentWithOptions(tmpReq: $_model.UpdateCustomAgentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateCustomAgentResponse> {
1726
+ tmpReq.validate();
1727
+ let request = new $_model.UpdateCustomAgentShrinkRequest({ });
1728
+ OpenApiUtil.convert(tmpReq, request);
1729
+ if (!$dara.isNull(tmpReq.tools)) {
1730
+ request.toolsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tools, "Tools", "json");
1731
+ }
1732
+
1733
+ let query = { };
1734
+ if (!$dara.isNull(request.customAgentId)) {
1735
+ query["CustomAgentId"] = request.customAgentId;
1736
+ }
1737
+
1738
+ if (!$dara.isNull(request.enableTools)) {
1739
+ query["EnableTools"] = request.enableTools;
1740
+ }
1741
+
1742
+ if (!$dara.isNull(request.name)) {
1743
+ query["Name"] = request.name;
1744
+ }
1745
+
1746
+ if (!$dara.isNull(request.systemPrompt)) {
1747
+ query["SystemPrompt"] = request.systemPrompt;
1748
+ }
1749
+
1750
+ if (!$dara.isNull(request.toolsShrink)) {
1751
+ query["Tools"] = request.toolsShrink;
1752
+ }
1753
+
1754
+ let req = new $OpenApiUtil.OpenApiRequest({
1755
+ query: OpenApiUtil.query(query),
1756
+ });
1757
+ let params = new $OpenApiUtil.Params({
1758
+ action: "UpdateCustomAgent",
1759
+ version: "2025-05-07",
1760
+ protocol: "HTTPS",
1761
+ pathname: "/",
1762
+ method: "POST",
1763
+ authType: "AK",
1764
+ style: "RPC",
1765
+ reqBodyType: "formData",
1766
+ bodyType: "json",
1767
+ });
1768
+ return $dara.cast<$_model.UpdateCustomAgentResponse>(await this.callApi(params, req, runtime), new $_model.UpdateCustomAgentResponse({}));
1769
+ }
1770
+
1771
+ /**
1772
+ * 更新Custom Agent
1773
+ *
1774
+ * @param request - UpdateCustomAgentRequest
1775
+ * @returns UpdateCustomAgentResponse
1776
+ */
1777
+ async updateCustomAgent(request: $_model.UpdateCustomAgentRequest): Promise<$_model.UpdateCustomAgentResponse> {
1778
+ let runtime = new $dara.RuntimeOptions({ });
1779
+ return await this.updateCustomAgentWithOptions(request, runtime);
1780
+ }
1781
+
1116
1782
  }