-
Notifications
You must be signed in to change notification settings - Fork 286
Expand file tree
/
Copy pathTdaiClient.java
More file actions
250 lines (226 loc) · 11 KB
/
TdaiClient.java
File metadata and controls
250 lines (226 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
/*
* Copyright (c) 2017-2025 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.tdai.v20250717;
import java.lang.reflect.Type;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.AbstractClient;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.JsonResponseModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.tdai.v20250717.models.*;
public class TdaiClient extends AbstractClient{
private static String endpoint = "tdai.tencentcloudapi.com";
private static String service = "tdai";
private static String version = "2025-07-17";
public TdaiClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public TdaiClient(Credential credential, String region, ClientProfile profile) {
super(TdaiClient.endpoint, TdaiClient.version, credential, region, profile);
}
/**
*本接口(ContinueAgentWork)用于重启智能体实例的值守任务,通常在用户需要重启时使用。
* @param req ContinueAgentWorkRequest
* @return ContinueAgentWorkResponse
* @throws TencentCloudSDKException
*/
public ContinueAgentWorkResponse ContinueAgentWork(ContinueAgentWorkRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ContinueAgentWork", ContinueAgentWorkResponse.class);
}
/**
*本接口(CreateAgentInstance)用于创建一个智能体实例,通常在用户购买一个智能体实例时使用。
* @param req CreateAgentInstanceRequest
* @return CreateAgentInstanceResponse
* @throws TencentCloudSDKException
*/
public CreateAgentInstanceResponse CreateAgentInstance(CreateAgentInstanceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateAgentInstance", CreateAgentInstanceResponse.class);
}
/**
*用于创建一次会话的SSE接口
* @param req CreateChatCompletionRequest
* @return CreateChatCompletionResponse
* @throws TencentCloudSDKException
*/
public CreateChatCompletionResponse CreateChatCompletion(CreateChatCompletionRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateChatCompletion", CreateChatCompletionResponse.class);
}
/**
*查询智能体值守任务详情
* @param req DescribeAgentDutyTaskDetailRequest
* @return DescribeAgentDutyTaskDetailResponse
* @throws TencentCloudSDKException
*/
public DescribeAgentDutyTaskDetailResponse DescribeAgentDutyTaskDetail(DescribeAgentDutyTaskDetailRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAgentDutyTaskDetail", DescribeAgentDutyTaskDetailResponse.class);
}
/**
*查询智能体值守任务列表
* @param req DescribeAgentDutyTasksRequest
* @return DescribeAgentDutyTasksResponse
* @throws TencentCloudSDKException
*/
public DescribeAgentDutyTasksResponse DescribeAgentDutyTasks(DescribeAgentDutyTasksRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAgentDutyTasks", DescribeAgentDutyTasksResponse.class);
}
/**
*本接口(DescribeAgentInstance)用于查询智能体实例详情,通常在用户查询所购买的所有智能体实例详情时使用。
* @param req DescribeAgentInstanceRequest
* @return DescribeAgentInstanceResponse
* @throws TencentCloudSDKException
*/
public DescribeAgentInstanceResponse DescribeAgentInstance(DescribeAgentInstanceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAgentInstance", DescribeAgentInstanceResponse.class);
}
/**
*本接口(DescribeAgentInstances)用于查询智能体实例列表,通常在用户查询所购买的所有智能体列表。
* @param req DescribeAgentInstancesRequest
* @return DescribeAgentInstancesResponse
* @throws TencentCloudSDKException
*/
public DescribeAgentInstancesResponse DescribeAgentInstances(DescribeAgentInstancesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAgentInstances", DescribeAgentInstancesResponse.class);
}
/**
*本接口(DescribeAgents)用于查询智能体列表,通常在用户查询所购买的所有智能体列表。
* @param req DescribeAgentsRequest
* @return DescribeAgentsResponse
* @throws TencentCloudSDKException
*/
public DescribeAgentsResponse DescribeAgents(DescribeAgentsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAgents", DescribeAgentsResponse.class);
}
/**
*本接口(DescribeChatDetail)用于查询对话详情,通常在用户查询会话的历史记录时使用。
* @param req DescribeChatDetailRequest
* @return DescribeChatDetailResponse
* @throws TencentCloudSDKException
*/
public DescribeChatDetailResponse DescribeChatDetail(DescribeChatDetailRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeChatDetail", DescribeChatDetailResponse.class);
}
/**
*本接口(DescribeChats)用于查询对话列表,通常在用户查询会话列表时使用。
* @param req DescribeChatsRequest
* @return DescribeChatsResponse
* @throws TencentCloudSDKException
*/
public DescribeChatsResponse DescribeChats(DescribeChatsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeChats", DescribeChatsResponse.class);
}
/**
*智能体报告地址生成并下载
* @param req DescribeReportUrlRequest
* @return DescribeReportUrlResponse
* @throws TencentCloudSDKException
*/
public DescribeReportUrlResponse DescribeReportUrl(DescribeReportUrlRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeReportUrl", DescribeReportUrlResponse.class);
}
/**
*本接口(IsolateAgentInstance)用于隔离智能体实例,通常在用户需要隔离智能体实例时使用。
* @param req IsolateAgentInstanceRequest
* @return IsolateAgentInstanceResponse
* @throws TencentCloudSDKException
*/
public IsolateAgentInstanceResponse IsolateAgentInstance(IsolateAgentInstanceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "IsolateAgentInstance", IsolateAgentInstanceResponse.class);
}
/**
*本接口(ModifyAgentInstanceParameters)用于修改智能体实例的参数列表,通常在用户需要配置智能体实例时使用。
* @param req ModifyAgentInstanceParametersRequest
* @return ModifyAgentInstanceParametersResponse
* @throws TencentCloudSDKException
*/
public ModifyAgentInstanceParametersResponse ModifyAgentInstanceParameters(ModifyAgentInstanceParametersRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyAgentInstanceParameters", ModifyAgentInstanceParametersResponse.class);
}
/**
*本接口(ModifyChatTitle)用于修改会话标题,通常在用户修改会话标题时使用。
* @param req ModifyChatTitleRequest
* @return ModifyChatTitleResponse
* @throws TencentCloudSDKException
*/
public ModifyChatTitleResponse ModifyChatTitle(ModifyChatTitleRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyChatTitle", ModifyChatTitleResponse.class);
}
/**
*本接口(PauseAgentWork)用于暂停智能体实例的值守任务,通常在用户需要暂停时使用。
* @param req PauseAgentWorkRequest
* @return PauseAgentWorkResponse
* @throws TencentCloudSDKException
*/
public PauseAgentWorkResponse PauseAgentWork(PauseAgentWorkRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "PauseAgentWork", PauseAgentWorkResponse.class);
}
/**
*本接口(RecoverAgentInstance)用于解隔离智能体实例,通常在用户需要解隔离智能体实例时使用。
* @param req RecoverAgentInstanceRequest
* @return RecoverAgentInstanceResponse
* @throws TencentCloudSDKException
*/
public RecoverAgentInstanceResponse RecoverAgentInstance(RecoverAgentInstanceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "RecoverAgentInstance", RecoverAgentInstanceResponse.class);
}
/**
*本接口(RemoveChat)用于删除会话,通常在用户删除会话时使用。
* @param req RemoveChatRequest
* @return RemoveChatResponse
* @throws TencentCloudSDKException
*/
public RemoveChatResponse RemoveChat(RemoveChatRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "RemoveChat", RemoveChatResponse.class);
}
/**
*该接口用于启动一个智能体的任务
* @param req StartAgentTaskRequest
* @return StartAgentTaskResponse
* @throws TencentCloudSDKException
*/
public StartAgentTaskResponse StartAgentTask(StartAgentTaskRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "StartAgentTask", StartAgentTaskResponse.class);
}
/**
*本接口(TerminateAgentInstance)用于下线智能体实例,通常在用户需要下线智能体实例时使用。
* @param req TerminateAgentInstanceRequest
* @return TerminateAgentInstanceResponse
* @throws TencentCloudSDKException
*/
public TerminateAgentInstanceResponse TerminateAgentInstance(TerminateAgentInstanceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "TerminateAgentInstance", TerminateAgentInstanceResponse.class);
}
}