huaweicloudsdkversatile 3.1.184__py3-none-any.whl
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.
- huaweicloudsdkversatile/__init__.py +0 -0
- huaweicloudsdkversatile/v1/__init__.py +32 -0
- huaweicloudsdkversatile/v1/model/__init__.py +29 -0
- huaweicloudsdkversatile/v1/model/agent_run_req.py +302 -0
- huaweicloudsdkversatile/v1/model/conversation.py +129 -0
- huaweicloudsdkversatile/v1/model/feedback_reason.py +136 -0
- huaweicloudsdkversatile/v1/model/knowledge_base_retrieval_req.py +251 -0
- huaweicloudsdkversatile/v1/model/message.py +506 -0
- huaweicloudsdkversatile/v1/model/node_message.py +282 -0
- huaweicloudsdkversatile/v1/model/node_run_info.py +709 -0
- huaweicloudsdkversatile/v1/model/node_run_info_inner_error.py +133 -0
- huaweicloudsdkversatile/v1/model/node_run_info_inner_error_error_body.py +137 -0
- huaweicloudsdkversatile/v1/model/plugin_config.py +137 -0
- huaweicloudsdkversatile/v1/model/retrieval_result_info.py +282 -0
- huaweicloudsdkversatile/v1/model/run_agent_request.py +276 -0
- huaweicloudsdkversatile/v1/model/run_agent_response.py +378 -0
- huaweicloudsdkversatile/v1/model/run_workflow_request.py +247 -0
- huaweicloudsdkversatile/v1/model/run_workflow_response.py +378 -0
- huaweicloudsdkversatile/v1/model/search_knowledge_base_request.py +104 -0
- huaweicloudsdkversatile/v1/model/search_knowledge_base_response.py +141 -0
- huaweicloudsdkversatile/v1/model/status.py +135 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_request.py +190 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_request_body.py +107 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_response.py +170 -0
- huaweicloudsdkversatile/v1/model/user_profile.py +137 -0
- huaweicloudsdkversatile/v1/model/workflow_run_req.py +344 -0
- huaweicloudsdkversatile/v1/model/workflow_run_stream_rsp.py +195 -0
- huaweicloudsdkversatile/v1/region/__init__.py +0 -0
- huaweicloudsdkversatile/v1/region/versatile_region.py +31 -0
- huaweicloudsdkversatile/v1/versatile_async_client.py +378 -0
- huaweicloudsdkversatile/v1/versatile_client.py +375 -0
- huaweicloudsdkversatile-3.1.184.dist-info/METADATA +25 -0
- huaweicloudsdkversatile-3.1.184.dist-info/RECORD +35 -0
- huaweicloudsdkversatile-3.1.184.dist-info/WHEEL +4 -0
- huaweicloudsdkversatile-3.1.184.dist-info/licenses/LICENSE +13 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class RunAgentRequest:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'agent_id': 'str',
|
|
19
|
+
'conversation_id': 'str',
|
|
20
|
+
'workspace_id': 'str',
|
|
21
|
+
'version': 'str',
|
|
22
|
+
'type': 'str',
|
|
23
|
+
'stream': 'bool',
|
|
24
|
+
'body': 'AgentRunReq'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
attribute_map = {
|
|
28
|
+
'agent_id': 'agent_id',
|
|
29
|
+
'conversation_id': 'conversation_id',
|
|
30
|
+
'workspace_id': 'workspace_id',
|
|
31
|
+
'version': 'version',
|
|
32
|
+
'type': 'type',
|
|
33
|
+
'stream': 'stream',
|
|
34
|
+
'body': 'body'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
def __init__(self, agent_id=None, conversation_id=None, workspace_id=None, version=None, type=None, stream=None, body=None):
|
|
38
|
+
r"""RunAgentRequest
|
|
39
|
+
|
|
40
|
+
The model defined in huaweicloud sdk
|
|
41
|
+
|
|
42
|
+
:param agent_id: **参数解释**: 智能体ID **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
43
|
+
:type agent_id: str
|
|
44
|
+
:param conversation_id: **参数解释**: 会话ID,历史对话记忆功能基于同一个会话 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
45
|
+
:type conversation_id: str
|
|
46
|
+
:param workspace_id: **参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
47
|
+
:type workspace_id: str
|
|
48
|
+
:param version: **参数解释**: 运行的智能体/工作流的发布版本号,默认运行最新发布版本 **取值范围**: 不涉及
|
|
49
|
+
:type version: str
|
|
50
|
+
:param type: **参数解释**: 指定运行的智能体是单智能体还是多智能体,默认 agent **取值范围**: agent, controller
|
|
51
|
+
:type type: str
|
|
52
|
+
:param stream: **参数解释**: 是否流式响应 **取值范围**: true,false(不传默认 true,支持流式)
|
|
53
|
+
:type stream: bool
|
|
54
|
+
:param body: Body of the RunAgentRequest
|
|
55
|
+
:type body: :class:`huaweicloudsdkversatile.v1.AgentRunReq`
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
self._agent_id = None
|
|
61
|
+
self._conversation_id = None
|
|
62
|
+
self._workspace_id = None
|
|
63
|
+
self._version = None
|
|
64
|
+
self._type = None
|
|
65
|
+
self._stream = None
|
|
66
|
+
self._body = None
|
|
67
|
+
self.discriminator = None
|
|
68
|
+
|
|
69
|
+
self.agent_id = agent_id
|
|
70
|
+
self.conversation_id = conversation_id
|
|
71
|
+
if workspace_id is not None:
|
|
72
|
+
self.workspace_id = workspace_id
|
|
73
|
+
if version is not None:
|
|
74
|
+
self.version = version
|
|
75
|
+
if type is not None:
|
|
76
|
+
self.type = type
|
|
77
|
+
if stream is not None:
|
|
78
|
+
self.stream = stream
|
|
79
|
+
if body is not None:
|
|
80
|
+
self.body = body
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def agent_id(self):
|
|
84
|
+
r"""Gets the agent_id of this RunAgentRequest.
|
|
85
|
+
|
|
86
|
+
**参数解释**: 智能体ID **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
87
|
+
|
|
88
|
+
:return: The agent_id of this RunAgentRequest.
|
|
89
|
+
:rtype: str
|
|
90
|
+
"""
|
|
91
|
+
return self._agent_id
|
|
92
|
+
|
|
93
|
+
@agent_id.setter
|
|
94
|
+
def agent_id(self, agent_id):
|
|
95
|
+
r"""Sets the agent_id of this RunAgentRequest.
|
|
96
|
+
|
|
97
|
+
**参数解释**: 智能体ID **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
98
|
+
|
|
99
|
+
:param agent_id: The agent_id of this RunAgentRequest.
|
|
100
|
+
:type agent_id: str
|
|
101
|
+
"""
|
|
102
|
+
self._agent_id = agent_id
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def conversation_id(self):
|
|
106
|
+
r"""Gets the conversation_id of this RunAgentRequest.
|
|
107
|
+
|
|
108
|
+
**参数解释**: 会话ID,历史对话记忆功能基于同一个会话 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
109
|
+
|
|
110
|
+
:return: The conversation_id of this RunAgentRequest.
|
|
111
|
+
:rtype: str
|
|
112
|
+
"""
|
|
113
|
+
return self._conversation_id
|
|
114
|
+
|
|
115
|
+
@conversation_id.setter
|
|
116
|
+
def conversation_id(self, conversation_id):
|
|
117
|
+
r"""Sets the conversation_id of this RunAgentRequest.
|
|
118
|
+
|
|
119
|
+
**参数解释**: 会话ID,历史对话记忆功能基于同一个会话 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
120
|
+
|
|
121
|
+
:param conversation_id: The conversation_id of this RunAgentRequest.
|
|
122
|
+
:type conversation_id: str
|
|
123
|
+
"""
|
|
124
|
+
self._conversation_id = conversation_id
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def workspace_id(self):
|
|
128
|
+
r"""Gets the workspace_id of this RunAgentRequest.
|
|
129
|
+
|
|
130
|
+
**参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
131
|
+
|
|
132
|
+
:return: The workspace_id of this RunAgentRequest.
|
|
133
|
+
:rtype: str
|
|
134
|
+
"""
|
|
135
|
+
return self._workspace_id
|
|
136
|
+
|
|
137
|
+
@workspace_id.setter
|
|
138
|
+
def workspace_id(self, workspace_id):
|
|
139
|
+
r"""Sets the workspace_id of this RunAgentRequest.
|
|
140
|
+
|
|
141
|
+
**参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符。
|
|
142
|
+
|
|
143
|
+
:param workspace_id: The workspace_id of this RunAgentRequest.
|
|
144
|
+
:type workspace_id: str
|
|
145
|
+
"""
|
|
146
|
+
self._workspace_id = workspace_id
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def version(self):
|
|
150
|
+
r"""Gets the version of this RunAgentRequest.
|
|
151
|
+
|
|
152
|
+
**参数解释**: 运行的智能体/工作流的发布版本号,默认运行最新发布版本 **取值范围**: 不涉及
|
|
153
|
+
|
|
154
|
+
:return: The version of this RunAgentRequest.
|
|
155
|
+
:rtype: str
|
|
156
|
+
"""
|
|
157
|
+
return self._version
|
|
158
|
+
|
|
159
|
+
@version.setter
|
|
160
|
+
def version(self, version):
|
|
161
|
+
r"""Sets the version of this RunAgentRequest.
|
|
162
|
+
|
|
163
|
+
**参数解释**: 运行的智能体/工作流的发布版本号,默认运行最新发布版本 **取值范围**: 不涉及
|
|
164
|
+
|
|
165
|
+
:param version: The version of this RunAgentRequest.
|
|
166
|
+
:type version: str
|
|
167
|
+
"""
|
|
168
|
+
self._version = version
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def type(self):
|
|
172
|
+
r"""Gets the type of this RunAgentRequest.
|
|
173
|
+
|
|
174
|
+
**参数解释**: 指定运行的智能体是单智能体还是多智能体,默认 agent **取值范围**: agent, controller
|
|
175
|
+
|
|
176
|
+
:return: The type of this RunAgentRequest.
|
|
177
|
+
:rtype: str
|
|
178
|
+
"""
|
|
179
|
+
return self._type
|
|
180
|
+
|
|
181
|
+
@type.setter
|
|
182
|
+
def type(self, type):
|
|
183
|
+
r"""Sets the type of this RunAgentRequest.
|
|
184
|
+
|
|
185
|
+
**参数解释**: 指定运行的智能体是单智能体还是多智能体,默认 agent **取值范围**: agent, controller
|
|
186
|
+
|
|
187
|
+
:param type: The type of this RunAgentRequest.
|
|
188
|
+
:type type: str
|
|
189
|
+
"""
|
|
190
|
+
self._type = type
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def stream(self):
|
|
194
|
+
r"""Gets the stream of this RunAgentRequest.
|
|
195
|
+
|
|
196
|
+
**参数解释**: 是否流式响应 **取值范围**: true,false(不传默认 true,支持流式)
|
|
197
|
+
|
|
198
|
+
:return: The stream of this RunAgentRequest.
|
|
199
|
+
:rtype: bool
|
|
200
|
+
"""
|
|
201
|
+
return self._stream
|
|
202
|
+
|
|
203
|
+
@stream.setter
|
|
204
|
+
def stream(self, stream):
|
|
205
|
+
r"""Sets the stream of this RunAgentRequest.
|
|
206
|
+
|
|
207
|
+
**参数解释**: 是否流式响应 **取值范围**: true,false(不传默认 true,支持流式)
|
|
208
|
+
|
|
209
|
+
:param stream: The stream of this RunAgentRequest.
|
|
210
|
+
:type stream: bool
|
|
211
|
+
"""
|
|
212
|
+
self._stream = stream
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def body(self):
|
|
216
|
+
r"""Gets the body of this RunAgentRequest.
|
|
217
|
+
|
|
218
|
+
:return: The body of this RunAgentRequest.
|
|
219
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.AgentRunReq`
|
|
220
|
+
"""
|
|
221
|
+
return self._body
|
|
222
|
+
|
|
223
|
+
@body.setter
|
|
224
|
+
def body(self, body):
|
|
225
|
+
r"""Sets the body of this RunAgentRequest.
|
|
226
|
+
|
|
227
|
+
:param body: The body of this RunAgentRequest.
|
|
228
|
+
:type body: :class:`huaweicloudsdkversatile.v1.AgentRunReq`
|
|
229
|
+
"""
|
|
230
|
+
self._body = body
|
|
231
|
+
|
|
232
|
+
def to_dict(self):
|
|
233
|
+
result = {}
|
|
234
|
+
|
|
235
|
+
for attr, _ in self.openapi_types.items():
|
|
236
|
+
value = getattr(self, attr)
|
|
237
|
+
if isinstance(value, list):
|
|
238
|
+
result[attr] = list(map(
|
|
239
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
240
|
+
value
|
|
241
|
+
))
|
|
242
|
+
elif hasattr(value, "to_dict"):
|
|
243
|
+
result[attr] = value.to_dict()
|
|
244
|
+
elif isinstance(value, dict):
|
|
245
|
+
result[attr] = dict(map(
|
|
246
|
+
lambda item: (item[0], item[1].to_dict())
|
|
247
|
+
if hasattr(item[1], "to_dict") else item,
|
|
248
|
+
value.items()
|
|
249
|
+
))
|
|
250
|
+
else:
|
|
251
|
+
if attr in self.sensitive_list:
|
|
252
|
+
result[attr] = "****"
|
|
253
|
+
else:
|
|
254
|
+
result[attr] = value
|
|
255
|
+
|
|
256
|
+
return result
|
|
257
|
+
|
|
258
|
+
def to_str(self):
|
|
259
|
+
"""Returns the string representation of the model"""
|
|
260
|
+
import simplejson as json
|
|
261
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
262
|
+
|
|
263
|
+
def __repr__(self):
|
|
264
|
+
"""For `print`"""
|
|
265
|
+
return self.to_str()
|
|
266
|
+
|
|
267
|
+
def __eq__(self, other):
|
|
268
|
+
"""Returns true if both objects are equal"""
|
|
269
|
+
if not isinstance(other, RunAgentRequest):
|
|
270
|
+
return False
|
|
271
|
+
|
|
272
|
+
return self.__dict__ == other.__dict__
|
|
273
|
+
|
|
274
|
+
def __ne__(self, other):
|
|
275
|
+
"""Returns true if both objects are not equal"""
|
|
276
|
+
return not self == other
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
4
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RunAgentResponse(SdkResponse):
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
Attributes:
|
|
11
|
+
openapi_types (dict): The key is attribute name
|
|
12
|
+
and the value is attribute type.
|
|
13
|
+
attribute_map (dict): The key is attribute name
|
|
14
|
+
and the value is json key in definition.
|
|
15
|
+
"""
|
|
16
|
+
sensitive_list = []
|
|
17
|
+
|
|
18
|
+
openapi_types = {
|
|
19
|
+
'conversation_id': 'str',
|
|
20
|
+
'outputs': 'dict(str, object)',
|
|
21
|
+
'messages': 'list[NodeMessage]',
|
|
22
|
+
'error_code': 'str',
|
|
23
|
+
'error_message': 'str',
|
|
24
|
+
'metadata': 'dict(str, object)',
|
|
25
|
+
'status': 'Status',
|
|
26
|
+
'start_time': 'int',
|
|
27
|
+
'end_time': 'int',
|
|
28
|
+
'node_info': 'list[NodeRunInfo]',
|
|
29
|
+
'events': 'list[WorkflowRunStreamRsp]'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
attribute_map = {
|
|
33
|
+
'conversation_id': 'conversation_id',
|
|
34
|
+
'outputs': 'outputs',
|
|
35
|
+
'messages': 'messages',
|
|
36
|
+
'error_code': 'error_code',
|
|
37
|
+
'error_message': 'error_message',
|
|
38
|
+
'metadata': 'metadata',
|
|
39
|
+
'status': 'status',
|
|
40
|
+
'start_time': 'start_time',
|
|
41
|
+
'end_time': 'end_time',
|
|
42
|
+
'node_info': 'node_info',
|
|
43
|
+
'events': 'events'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
def __init__(self, conversation_id=None, outputs=None, messages=None, error_code=None, error_message=None, metadata=None, status=None, start_time=None, end_time=None, node_info=None, events=None):
|
|
47
|
+
r"""RunAgentResponse
|
|
48
|
+
|
|
49
|
+
The model defined in huaweicloud sdk
|
|
50
|
+
|
|
51
|
+
:param conversation_id: 会话id
|
|
52
|
+
:type conversation_id: str
|
|
53
|
+
:param outputs:
|
|
54
|
+
:type outputs: dict(str, object)
|
|
55
|
+
:param messages:
|
|
56
|
+
:type messages: list[:class:`huaweicloudsdkversatile.v1.NodeMessage`]
|
|
57
|
+
:param error_code: 会话id
|
|
58
|
+
:type error_code: str
|
|
59
|
+
:param error_message: 会话id
|
|
60
|
+
:type error_message: str
|
|
61
|
+
:param metadata:
|
|
62
|
+
:type metadata: dict(str, object)
|
|
63
|
+
:param status:
|
|
64
|
+
:type status: :class:`huaweicloudsdkversatile.v1.Status`
|
|
65
|
+
:param start_time: 开始时间
|
|
66
|
+
:type start_time: int
|
|
67
|
+
:param end_time: 结束时间
|
|
68
|
+
:type end_time: int
|
|
69
|
+
:param node_info:
|
|
70
|
+
:type node_info: list[:class:`huaweicloudsdkversatile.v1.NodeRunInfo`]
|
|
71
|
+
:param events:
|
|
72
|
+
:type events: list[:class:`huaweicloudsdkversatile.v1.WorkflowRunStreamRsp`]
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
super().__init__()
|
|
76
|
+
|
|
77
|
+
self._conversation_id = None
|
|
78
|
+
self._outputs = None
|
|
79
|
+
self._messages = None
|
|
80
|
+
self._error_code = None
|
|
81
|
+
self._error_message = None
|
|
82
|
+
self._metadata = None
|
|
83
|
+
self._status = None
|
|
84
|
+
self._start_time = None
|
|
85
|
+
self._end_time = None
|
|
86
|
+
self._node_info = None
|
|
87
|
+
self._events = None
|
|
88
|
+
self.discriminator = None
|
|
89
|
+
|
|
90
|
+
if conversation_id is not None:
|
|
91
|
+
self.conversation_id = conversation_id
|
|
92
|
+
if outputs is not None:
|
|
93
|
+
self.outputs = outputs
|
|
94
|
+
if messages is not None:
|
|
95
|
+
self.messages = messages
|
|
96
|
+
if error_code is not None:
|
|
97
|
+
self.error_code = error_code
|
|
98
|
+
if error_message is not None:
|
|
99
|
+
self.error_message = error_message
|
|
100
|
+
if metadata is not None:
|
|
101
|
+
self.metadata = metadata
|
|
102
|
+
if status is not None:
|
|
103
|
+
self.status = status
|
|
104
|
+
if start_time is not None:
|
|
105
|
+
self.start_time = start_time
|
|
106
|
+
if end_time is not None:
|
|
107
|
+
self.end_time = end_time
|
|
108
|
+
if node_info is not None:
|
|
109
|
+
self.node_info = node_info
|
|
110
|
+
if events is not None:
|
|
111
|
+
self.events = events
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def conversation_id(self):
|
|
115
|
+
r"""Gets the conversation_id of this RunAgentResponse.
|
|
116
|
+
|
|
117
|
+
会话id
|
|
118
|
+
|
|
119
|
+
:return: The conversation_id of this RunAgentResponse.
|
|
120
|
+
:rtype: str
|
|
121
|
+
"""
|
|
122
|
+
return self._conversation_id
|
|
123
|
+
|
|
124
|
+
@conversation_id.setter
|
|
125
|
+
def conversation_id(self, conversation_id):
|
|
126
|
+
r"""Sets the conversation_id of this RunAgentResponse.
|
|
127
|
+
|
|
128
|
+
会话id
|
|
129
|
+
|
|
130
|
+
:param conversation_id: The conversation_id of this RunAgentResponse.
|
|
131
|
+
:type conversation_id: str
|
|
132
|
+
"""
|
|
133
|
+
self._conversation_id = conversation_id
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def outputs(self):
|
|
137
|
+
r"""Gets the outputs of this RunAgentResponse.
|
|
138
|
+
|
|
139
|
+
:return: The outputs of this RunAgentResponse.
|
|
140
|
+
:rtype: dict(str, object)
|
|
141
|
+
"""
|
|
142
|
+
return self._outputs
|
|
143
|
+
|
|
144
|
+
@outputs.setter
|
|
145
|
+
def outputs(self, outputs):
|
|
146
|
+
r"""Sets the outputs of this RunAgentResponse.
|
|
147
|
+
|
|
148
|
+
:param outputs: The outputs of this RunAgentResponse.
|
|
149
|
+
:type outputs: dict(str, object)
|
|
150
|
+
"""
|
|
151
|
+
self._outputs = outputs
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def messages(self):
|
|
155
|
+
r"""Gets the messages of this RunAgentResponse.
|
|
156
|
+
|
|
157
|
+
:return: The messages of this RunAgentResponse.
|
|
158
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.NodeMessage`]
|
|
159
|
+
"""
|
|
160
|
+
return self._messages
|
|
161
|
+
|
|
162
|
+
@messages.setter
|
|
163
|
+
def messages(self, messages):
|
|
164
|
+
r"""Sets the messages of this RunAgentResponse.
|
|
165
|
+
|
|
166
|
+
:param messages: The messages of this RunAgentResponse.
|
|
167
|
+
:type messages: list[:class:`huaweicloudsdkversatile.v1.NodeMessage`]
|
|
168
|
+
"""
|
|
169
|
+
self._messages = messages
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
def error_code(self):
|
|
173
|
+
r"""Gets the error_code of this RunAgentResponse.
|
|
174
|
+
|
|
175
|
+
会话id
|
|
176
|
+
|
|
177
|
+
:return: The error_code of this RunAgentResponse.
|
|
178
|
+
:rtype: str
|
|
179
|
+
"""
|
|
180
|
+
return self._error_code
|
|
181
|
+
|
|
182
|
+
@error_code.setter
|
|
183
|
+
def error_code(self, error_code):
|
|
184
|
+
r"""Sets the error_code of this RunAgentResponse.
|
|
185
|
+
|
|
186
|
+
会话id
|
|
187
|
+
|
|
188
|
+
:param error_code: The error_code of this RunAgentResponse.
|
|
189
|
+
:type error_code: str
|
|
190
|
+
"""
|
|
191
|
+
self._error_code = error_code
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def error_message(self):
|
|
195
|
+
r"""Gets the error_message of this RunAgentResponse.
|
|
196
|
+
|
|
197
|
+
会话id
|
|
198
|
+
|
|
199
|
+
:return: The error_message of this RunAgentResponse.
|
|
200
|
+
:rtype: str
|
|
201
|
+
"""
|
|
202
|
+
return self._error_message
|
|
203
|
+
|
|
204
|
+
@error_message.setter
|
|
205
|
+
def error_message(self, error_message):
|
|
206
|
+
r"""Sets the error_message of this RunAgentResponse.
|
|
207
|
+
|
|
208
|
+
会话id
|
|
209
|
+
|
|
210
|
+
:param error_message: The error_message of this RunAgentResponse.
|
|
211
|
+
:type error_message: str
|
|
212
|
+
"""
|
|
213
|
+
self._error_message = error_message
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def metadata(self):
|
|
217
|
+
r"""Gets the metadata of this RunAgentResponse.
|
|
218
|
+
|
|
219
|
+
:return: The metadata of this RunAgentResponse.
|
|
220
|
+
:rtype: dict(str, object)
|
|
221
|
+
"""
|
|
222
|
+
return self._metadata
|
|
223
|
+
|
|
224
|
+
@metadata.setter
|
|
225
|
+
def metadata(self, metadata):
|
|
226
|
+
r"""Sets the metadata of this RunAgentResponse.
|
|
227
|
+
|
|
228
|
+
:param metadata: The metadata of this RunAgentResponse.
|
|
229
|
+
:type metadata: dict(str, object)
|
|
230
|
+
"""
|
|
231
|
+
self._metadata = metadata
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def status(self):
|
|
235
|
+
r"""Gets the status of this RunAgentResponse.
|
|
236
|
+
|
|
237
|
+
:return: The status of this RunAgentResponse.
|
|
238
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.Status`
|
|
239
|
+
"""
|
|
240
|
+
return self._status
|
|
241
|
+
|
|
242
|
+
@status.setter
|
|
243
|
+
def status(self, status):
|
|
244
|
+
r"""Sets the status of this RunAgentResponse.
|
|
245
|
+
|
|
246
|
+
:param status: The status of this RunAgentResponse.
|
|
247
|
+
:type status: :class:`huaweicloudsdkversatile.v1.Status`
|
|
248
|
+
"""
|
|
249
|
+
self._status = status
|
|
250
|
+
|
|
251
|
+
@property
|
|
252
|
+
def start_time(self):
|
|
253
|
+
r"""Gets the start_time of this RunAgentResponse.
|
|
254
|
+
|
|
255
|
+
开始时间
|
|
256
|
+
|
|
257
|
+
:return: The start_time of this RunAgentResponse.
|
|
258
|
+
:rtype: int
|
|
259
|
+
"""
|
|
260
|
+
return self._start_time
|
|
261
|
+
|
|
262
|
+
@start_time.setter
|
|
263
|
+
def start_time(self, start_time):
|
|
264
|
+
r"""Sets the start_time of this RunAgentResponse.
|
|
265
|
+
|
|
266
|
+
开始时间
|
|
267
|
+
|
|
268
|
+
:param start_time: The start_time of this RunAgentResponse.
|
|
269
|
+
:type start_time: int
|
|
270
|
+
"""
|
|
271
|
+
self._start_time = start_time
|
|
272
|
+
|
|
273
|
+
@property
|
|
274
|
+
def end_time(self):
|
|
275
|
+
r"""Gets the end_time of this RunAgentResponse.
|
|
276
|
+
|
|
277
|
+
结束时间
|
|
278
|
+
|
|
279
|
+
:return: The end_time of this RunAgentResponse.
|
|
280
|
+
:rtype: int
|
|
281
|
+
"""
|
|
282
|
+
return self._end_time
|
|
283
|
+
|
|
284
|
+
@end_time.setter
|
|
285
|
+
def end_time(self, end_time):
|
|
286
|
+
r"""Sets the end_time of this RunAgentResponse.
|
|
287
|
+
|
|
288
|
+
结束时间
|
|
289
|
+
|
|
290
|
+
:param end_time: The end_time of this RunAgentResponse.
|
|
291
|
+
:type end_time: int
|
|
292
|
+
"""
|
|
293
|
+
self._end_time = end_time
|
|
294
|
+
|
|
295
|
+
@property
|
|
296
|
+
def node_info(self):
|
|
297
|
+
r"""Gets the node_info of this RunAgentResponse.
|
|
298
|
+
|
|
299
|
+
:return: The node_info of this RunAgentResponse.
|
|
300
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.NodeRunInfo`]
|
|
301
|
+
"""
|
|
302
|
+
return self._node_info
|
|
303
|
+
|
|
304
|
+
@node_info.setter
|
|
305
|
+
def node_info(self, node_info):
|
|
306
|
+
r"""Sets the node_info of this RunAgentResponse.
|
|
307
|
+
|
|
308
|
+
:param node_info: The node_info of this RunAgentResponse.
|
|
309
|
+
:type node_info: list[:class:`huaweicloudsdkversatile.v1.NodeRunInfo`]
|
|
310
|
+
"""
|
|
311
|
+
self._node_info = node_info
|
|
312
|
+
|
|
313
|
+
@property
|
|
314
|
+
def events(self):
|
|
315
|
+
r"""Gets the events of this RunAgentResponse.
|
|
316
|
+
|
|
317
|
+
:return: The events of this RunAgentResponse.
|
|
318
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.WorkflowRunStreamRsp`]
|
|
319
|
+
"""
|
|
320
|
+
return self._events
|
|
321
|
+
|
|
322
|
+
@events.setter
|
|
323
|
+
def events(self, events):
|
|
324
|
+
r"""Sets the events of this RunAgentResponse.
|
|
325
|
+
|
|
326
|
+
:param events: The events of this RunAgentResponse.
|
|
327
|
+
:type events: list[:class:`huaweicloudsdkversatile.v1.WorkflowRunStreamRsp`]
|
|
328
|
+
"""
|
|
329
|
+
self._events = events
|
|
330
|
+
|
|
331
|
+
def to_dict(self):
|
|
332
|
+
import warnings
|
|
333
|
+
warnings.warn("RunAgentResponse.to_dict() is deprecated and no longer maintained, "
|
|
334
|
+
"use to_json_object() to get the response content.", DeprecationWarning)
|
|
335
|
+
result = {}
|
|
336
|
+
|
|
337
|
+
for attr, _ in self.openapi_types.items():
|
|
338
|
+
value = getattr(self, attr)
|
|
339
|
+
if isinstance(value, list):
|
|
340
|
+
result[attr] = list(map(
|
|
341
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
342
|
+
value
|
|
343
|
+
))
|
|
344
|
+
elif hasattr(value, "to_dict"):
|
|
345
|
+
result[attr] = value.to_dict()
|
|
346
|
+
elif isinstance(value, dict):
|
|
347
|
+
result[attr] = dict(map(
|
|
348
|
+
lambda item: (item[0], item[1].to_dict())
|
|
349
|
+
if hasattr(item[1], "to_dict") else item,
|
|
350
|
+
value.items()
|
|
351
|
+
))
|
|
352
|
+
else:
|
|
353
|
+
if attr in self.sensitive_list:
|
|
354
|
+
result[attr] = "****"
|
|
355
|
+
else:
|
|
356
|
+
result[attr] = value
|
|
357
|
+
|
|
358
|
+
return result
|
|
359
|
+
|
|
360
|
+
def to_str(self):
|
|
361
|
+
"""Returns the string representation of the model"""
|
|
362
|
+
import simplejson as json
|
|
363
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
364
|
+
|
|
365
|
+
def __repr__(self):
|
|
366
|
+
"""For `print`"""
|
|
367
|
+
return self.to_str()
|
|
368
|
+
|
|
369
|
+
def __eq__(self, other):
|
|
370
|
+
"""Returns true if both objects are equal"""
|
|
371
|
+
if not isinstance(other, RunAgentResponse):
|
|
372
|
+
return False
|
|
373
|
+
|
|
374
|
+
return self.__dict__ == other.__dict__
|
|
375
|
+
|
|
376
|
+
def __ne__(self, other):
|
|
377
|
+
"""Returns true if both objects are not equal"""
|
|
378
|
+
return not self == other
|