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
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkversatile.v1.versatile_client import VersatileClient
|
|
6
|
+
from huaweicloudsdkversatile.v1.versatile_async_client import VersatileAsyncClient
|
|
7
|
+
|
|
8
|
+
from huaweicloudsdkversatile.v1.model.agent_run_req import AgentRunReq
|
|
9
|
+
from huaweicloudsdkversatile.v1.model.conversation import Conversation
|
|
10
|
+
from huaweicloudsdkversatile.v1.model.feedback_reason import FeedbackReason
|
|
11
|
+
from huaweicloudsdkversatile.v1.model.knowledge_base_retrieval_req import KnowledgeBaseRetrievalReq
|
|
12
|
+
from huaweicloudsdkversatile.v1.model.message import Message
|
|
13
|
+
from huaweicloudsdkversatile.v1.model.node_message import NodeMessage
|
|
14
|
+
from huaweicloudsdkversatile.v1.model.node_run_info import NodeRunInfo
|
|
15
|
+
from huaweicloudsdkversatile.v1.model.node_run_info_inner_error import NodeRunInfoInnerError
|
|
16
|
+
from huaweicloudsdkversatile.v1.model.node_run_info_inner_error_error_body import NodeRunInfoInnerErrorErrorBody
|
|
17
|
+
from huaweicloudsdkversatile.v1.model.plugin_config import PluginConfig
|
|
18
|
+
from huaweicloudsdkversatile.v1.model.retrieval_result_info import RetrievalResultInfo
|
|
19
|
+
from huaweicloudsdkversatile.v1.model.run_agent_request import RunAgentRequest
|
|
20
|
+
from huaweicloudsdkversatile.v1.model.run_agent_response import RunAgentResponse
|
|
21
|
+
from huaweicloudsdkversatile.v1.model.run_workflow_request import RunWorkflowRequest
|
|
22
|
+
from huaweicloudsdkversatile.v1.model.run_workflow_response import RunWorkflowResponse
|
|
23
|
+
from huaweicloudsdkversatile.v1.model.search_knowledge_base_request import SearchKnowledgeBaseRequest
|
|
24
|
+
from huaweicloudsdkversatile.v1.model.search_knowledge_base_response import SearchKnowledgeBaseResponse
|
|
25
|
+
from huaweicloudsdkversatile.v1.model.status import Status
|
|
26
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_request import UploadAgentFileRequest
|
|
27
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_request_body import UploadAgentFileRequestBody
|
|
28
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_response import UploadAgentFileResponse
|
|
29
|
+
from huaweicloudsdkversatile.v1.model.user_profile import UserProfile
|
|
30
|
+
from huaweicloudsdkversatile.v1.model.workflow_run_req import WorkflowRunReq
|
|
31
|
+
from huaweicloudsdkversatile.v1.model.workflow_run_stream_rsp import WorkflowRunStreamRsp
|
|
32
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
# import models into model package
|
|
6
|
+
from huaweicloudsdkversatile.v1.model.agent_run_req import AgentRunReq
|
|
7
|
+
from huaweicloudsdkversatile.v1.model.conversation import Conversation
|
|
8
|
+
from huaweicloudsdkversatile.v1.model.feedback_reason import FeedbackReason
|
|
9
|
+
from huaweicloudsdkversatile.v1.model.knowledge_base_retrieval_req import KnowledgeBaseRetrievalReq
|
|
10
|
+
from huaweicloudsdkversatile.v1.model.message import Message
|
|
11
|
+
from huaweicloudsdkversatile.v1.model.node_message import NodeMessage
|
|
12
|
+
from huaweicloudsdkversatile.v1.model.node_run_info import NodeRunInfo
|
|
13
|
+
from huaweicloudsdkversatile.v1.model.node_run_info_inner_error import NodeRunInfoInnerError
|
|
14
|
+
from huaweicloudsdkversatile.v1.model.node_run_info_inner_error_error_body import NodeRunInfoInnerErrorErrorBody
|
|
15
|
+
from huaweicloudsdkversatile.v1.model.plugin_config import PluginConfig
|
|
16
|
+
from huaweicloudsdkversatile.v1.model.retrieval_result_info import RetrievalResultInfo
|
|
17
|
+
from huaweicloudsdkversatile.v1.model.run_agent_request import RunAgentRequest
|
|
18
|
+
from huaweicloudsdkversatile.v1.model.run_agent_response import RunAgentResponse
|
|
19
|
+
from huaweicloudsdkversatile.v1.model.run_workflow_request import RunWorkflowRequest
|
|
20
|
+
from huaweicloudsdkversatile.v1.model.run_workflow_response import RunWorkflowResponse
|
|
21
|
+
from huaweicloudsdkversatile.v1.model.search_knowledge_base_request import SearchKnowledgeBaseRequest
|
|
22
|
+
from huaweicloudsdkversatile.v1.model.search_knowledge_base_response import SearchKnowledgeBaseResponse
|
|
23
|
+
from huaweicloudsdkversatile.v1.model.status import Status
|
|
24
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_request import UploadAgentFileRequest
|
|
25
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_request_body import UploadAgentFileRequestBody
|
|
26
|
+
from huaweicloudsdkversatile.v1.model.upload_agent_file_response import UploadAgentFileResponse
|
|
27
|
+
from huaweicloudsdkversatile.v1.model.user_profile import UserProfile
|
|
28
|
+
from huaweicloudsdkversatile.v1.model.workflow_run_req import WorkflowRunReq
|
|
29
|
+
from huaweicloudsdkversatile.v1.model.workflow_run_stream_rsp import WorkflowRunStreamRsp
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AgentRunReq:
|
|
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
|
+
'query': 'str',
|
|
19
|
+
'inputs': 'dict(str, object)',
|
|
20
|
+
'user_profile': 'UserProfile',
|
|
21
|
+
'tool_switch_dict': 'dict(str, bool)',
|
|
22
|
+
'model_deployment_id': 'str',
|
|
23
|
+
'enable_history': 'bool',
|
|
24
|
+
'histories': 'list[Message]',
|
|
25
|
+
'files': 'list[str]'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
attribute_map = {
|
|
29
|
+
'query': 'query',
|
|
30
|
+
'inputs': 'inputs',
|
|
31
|
+
'user_profile': 'user_profile',
|
|
32
|
+
'tool_switch_dict': 'tool_switch_dict',
|
|
33
|
+
'model_deployment_id': 'model_deployment_id',
|
|
34
|
+
'enable_history': 'enable_history',
|
|
35
|
+
'histories': 'histories',
|
|
36
|
+
'files': 'files'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def __init__(self, query=None, inputs=None, user_profile=None, tool_switch_dict=None, model_deployment_id=None, enable_history=None, histories=None, files=None):
|
|
40
|
+
r"""AgentRunReq
|
|
41
|
+
|
|
42
|
+
The model defined in huaweicloud sdk
|
|
43
|
+
|
|
44
|
+
:param query: 请求问题
|
|
45
|
+
:type query: str
|
|
46
|
+
:param inputs:
|
|
47
|
+
:type inputs: dict(str, object)
|
|
48
|
+
:param user_profile:
|
|
49
|
+
:type user_profile: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
50
|
+
:param tool_switch_dict: 插件是否开启
|
|
51
|
+
:type tool_switch_dict: dict(str, bool)
|
|
52
|
+
:param model_deployment_id: 模型ID
|
|
53
|
+
:type model_deployment_id: str
|
|
54
|
+
:param enable_history: 是否记录会话历史
|
|
55
|
+
:type enable_history: bool
|
|
56
|
+
:param histories: 传入的会话历史
|
|
57
|
+
:type histories: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
58
|
+
:param files: 上传文件列表
|
|
59
|
+
:type files: list[str]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
self._query = None
|
|
65
|
+
self._inputs = None
|
|
66
|
+
self._user_profile = None
|
|
67
|
+
self._tool_switch_dict = None
|
|
68
|
+
self._model_deployment_id = None
|
|
69
|
+
self._enable_history = None
|
|
70
|
+
self._histories = None
|
|
71
|
+
self._files = None
|
|
72
|
+
self.discriminator = None
|
|
73
|
+
|
|
74
|
+
self.query = query
|
|
75
|
+
if inputs is not None:
|
|
76
|
+
self.inputs = inputs
|
|
77
|
+
if user_profile is not None:
|
|
78
|
+
self.user_profile = user_profile
|
|
79
|
+
if tool_switch_dict is not None:
|
|
80
|
+
self.tool_switch_dict = tool_switch_dict
|
|
81
|
+
if model_deployment_id is not None:
|
|
82
|
+
self.model_deployment_id = model_deployment_id
|
|
83
|
+
if enable_history is not None:
|
|
84
|
+
self.enable_history = enable_history
|
|
85
|
+
if histories is not None:
|
|
86
|
+
self.histories = histories
|
|
87
|
+
if files is not None:
|
|
88
|
+
self.files = files
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def query(self):
|
|
92
|
+
r"""Gets the query of this AgentRunReq.
|
|
93
|
+
|
|
94
|
+
请求问题
|
|
95
|
+
|
|
96
|
+
:return: The query of this AgentRunReq.
|
|
97
|
+
:rtype: str
|
|
98
|
+
"""
|
|
99
|
+
return self._query
|
|
100
|
+
|
|
101
|
+
@query.setter
|
|
102
|
+
def query(self, query):
|
|
103
|
+
r"""Sets the query of this AgentRunReq.
|
|
104
|
+
|
|
105
|
+
请求问题
|
|
106
|
+
|
|
107
|
+
:param query: The query of this AgentRunReq.
|
|
108
|
+
:type query: str
|
|
109
|
+
"""
|
|
110
|
+
self._query = query
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def inputs(self):
|
|
114
|
+
r"""Gets the inputs of this AgentRunReq.
|
|
115
|
+
|
|
116
|
+
:return: The inputs of this AgentRunReq.
|
|
117
|
+
:rtype: dict(str, object)
|
|
118
|
+
"""
|
|
119
|
+
return self._inputs
|
|
120
|
+
|
|
121
|
+
@inputs.setter
|
|
122
|
+
def inputs(self, inputs):
|
|
123
|
+
r"""Sets the inputs of this AgentRunReq.
|
|
124
|
+
|
|
125
|
+
:param inputs: The inputs of this AgentRunReq.
|
|
126
|
+
:type inputs: dict(str, object)
|
|
127
|
+
"""
|
|
128
|
+
self._inputs = inputs
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def user_profile(self):
|
|
132
|
+
r"""Gets the user_profile of this AgentRunReq.
|
|
133
|
+
|
|
134
|
+
:return: The user_profile of this AgentRunReq.
|
|
135
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
136
|
+
"""
|
|
137
|
+
return self._user_profile
|
|
138
|
+
|
|
139
|
+
@user_profile.setter
|
|
140
|
+
def user_profile(self, user_profile):
|
|
141
|
+
r"""Sets the user_profile of this AgentRunReq.
|
|
142
|
+
|
|
143
|
+
:param user_profile: The user_profile of this AgentRunReq.
|
|
144
|
+
:type user_profile: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
145
|
+
"""
|
|
146
|
+
self._user_profile = user_profile
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def tool_switch_dict(self):
|
|
150
|
+
r"""Gets the tool_switch_dict of this AgentRunReq.
|
|
151
|
+
|
|
152
|
+
插件是否开启
|
|
153
|
+
|
|
154
|
+
:return: The tool_switch_dict of this AgentRunReq.
|
|
155
|
+
:rtype: dict(str, bool)
|
|
156
|
+
"""
|
|
157
|
+
return self._tool_switch_dict
|
|
158
|
+
|
|
159
|
+
@tool_switch_dict.setter
|
|
160
|
+
def tool_switch_dict(self, tool_switch_dict):
|
|
161
|
+
r"""Sets the tool_switch_dict of this AgentRunReq.
|
|
162
|
+
|
|
163
|
+
插件是否开启
|
|
164
|
+
|
|
165
|
+
:param tool_switch_dict: The tool_switch_dict of this AgentRunReq.
|
|
166
|
+
:type tool_switch_dict: dict(str, bool)
|
|
167
|
+
"""
|
|
168
|
+
self._tool_switch_dict = tool_switch_dict
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def model_deployment_id(self):
|
|
172
|
+
r"""Gets the model_deployment_id of this AgentRunReq.
|
|
173
|
+
|
|
174
|
+
模型ID
|
|
175
|
+
|
|
176
|
+
:return: The model_deployment_id of this AgentRunReq.
|
|
177
|
+
:rtype: str
|
|
178
|
+
"""
|
|
179
|
+
return self._model_deployment_id
|
|
180
|
+
|
|
181
|
+
@model_deployment_id.setter
|
|
182
|
+
def model_deployment_id(self, model_deployment_id):
|
|
183
|
+
r"""Sets the model_deployment_id of this AgentRunReq.
|
|
184
|
+
|
|
185
|
+
模型ID
|
|
186
|
+
|
|
187
|
+
:param model_deployment_id: The model_deployment_id of this AgentRunReq.
|
|
188
|
+
:type model_deployment_id: str
|
|
189
|
+
"""
|
|
190
|
+
self._model_deployment_id = model_deployment_id
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def enable_history(self):
|
|
194
|
+
r"""Gets the enable_history of this AgentRunReq.
|
|
195
|
+
|
|
196
|
+
是否记录会话历史
|
|
197
|
+
|
|
198
|
+
:return: The enable_history of this AgentRunReq.
|
|
199
|
+
:rtype: bool
|
|
200
|
+
"""
|
|
201
|
+
return self._enable_history
|
|
202
|
+
|
|
203
|
+
@enable_history.setter
|
|
204
|
+
def enable_history(self, enable_history):
|
|
205
|
+
r"""Sets the enable_history of this AgentRunReq.
|
|
206
|
+
|
|
207
|
+
是否记录会话历史
|
|
208
|
+
|
|
209
|
+
:param enable_history: The enable_history of this AgentRunReq.
|
|
210
|
+
:type enable_history: bool
|
|
211
|
+
"""
|
|
212
|
+
self._enable_history = enable_history
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def histories(self):
|
|
216
|
+
r"""Gets the histories of this AgentRunReq.
|
|
217
|
+
|
|
218
|
+
传入的会话历史
|
|
219
|
+
|
|
220
|
+
:return: The histories of this AgentRunReq.
|
|
221
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
222
|
+
"""
|
|
223
|
+
return self._histories
|
|
224
|
+
|
|
225
|
+
@histories.setter
|
|
226
|
+
def histories(self, histories):
|
|
227
|
+
r"""Sets the histories of this AgentRunReq.
|
|
228
|
+
|
|
229
|
+
传入的会话历史
|
|
230
|
+
|
|
231
|
+
:param histories: The histories of this AgentRunReq.
|
|
232
|
+
:type histories: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
233
|
+
"""
|
|
234
|
+
self._histories = histories
|
|
235
|
+
|
|
236
|
+
@property
|
|
237
|
+
def files(self):
|
|
238
|
+
r"""Gets the files of this AgentRunReq.
|
|
239
|
+
|
|
240
|
+
上传文件列表
|
|
241
|
+
|
|
242
|
+
:return: The files of this AgentRunReq.
|
|
243
|
+
:rtype: list[str]
|
|
244
|
+
"""
|
|
245
|
+
return self._files
|
|
246
|
+
|
|
247
|
+
@files.setter
|
|
248
|
+
def files(self, files):
|
|
249
|
+
r"""Sets the files of this AgentRunReq.
|
|
250
|
+
|
|
251
|
+
上传文件列表
|
|
252
|
+
|
|
253
|
+
:param files: The files of this AgentRunReq.
|
|
254
|
+
:type files: list[str]
|
|
255
|
+
"""
|
|
256
|
+
self._files = files
|
|
257
|
+
|
|
258
|
+
def to_dict(self):
|
|
259
|
+
result = {}
|
|
260
|
+
|
|
261
|
+
for attr, _ in self.openapi_types.items():
|
|
262
|
+
value = getattr(self, attr)
|
|
263
|
+
if isinstance(value, list):
|
|
264
|
+
result[attr] = list(map(
|
|
265
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
266
|
+
value
|
|
267
|
+
))
|
|
268
|
+
elif hasattr(value, "to_dict"):
|
|
269
|
+
result[attr] = value.to_dict()
|
|
270
|
+
elif isinstance(value, dict):
|
|
271
|
+
result[attr] = dict(map(
|
|
272
|
+
lambda item: (item[0], item[1].to_dict())
|
|
273
|
+
if hasattr(item[1], "to_dict") else item,
|
|
274
|
+
value.items()
|
|
275
|
+
))
|
|
276
|
+
else:
|
|
277
|
+
if attr in self.sensitive_list:
|
|
278
|
+
result[attr] = "****"
|
|
279
|
+
else:
|
|
280
|
+
result[attr] = value
|
|
281
|
+
|
|
282
|
+
return result
|
|
283
|
+
|
|
284
|
+
def to_str(self):
|
|
285
|
+
"""Returns the string representation of the model"""
|
|
286
|
+
import simplejson as json
|
|
287
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
288
|
+
|
|
289
|
+
def __repr__(self):
|
|
290
|
+
"""For `print`"""
|
|
291
|
+
return self.to_str()
|
|
292
|
+
|
|
293
|
+
def __eq__(self, other):
|
|
294
|
+
"""Returns true if both objects are equal"""
|
|
295
|
+
if not isinstance(other, AgentRunReq):
|
|
296
|
+
return False
|
|
297
|
+
|
|
298
|
+
return self.__dict__ == other.__dict__
|
|
299
|
+
|
|
300
|
+
def __ne__(self, other):
|
|
301
|
+
"""Returns true if both objects are not equal"""
|
|
302
|
+
return not self == other
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Conversation:
|
|
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
|
+
'last_update_time': 'int',
|
|
19
|
+
'message_list': 'list[Message]'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'last_update_time': 'lastUpdateTime',
|
|
24
|
+
'message_list': 'messageList'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, last_update_time=None, message_list=None):
|
|
28
|
+
r"""Conversation
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param last_update_time:
|
|
33
|
+
:type last_update_time: int
|
|
34
|
+
:param message_list:
|
|
35
|
+
:type message_list: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._last_update_time = None
|
|
41
|
+
self._message_list = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
if last_update_time is not None:
|
|
45
|
+
self.last_update_time = last_update_time
|
|
46
|
+
if message_list is not None:
|
|
47
|
+
self.message_list = message_list
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def last_update_time(self):
|
|
51
|
+
r"""Gets the last_update_time of this Conversation.
|
|
52
|
+
|
|
53
|
+
:return: The last_update_time of this Conversation.
|
|
54
|
+
:rtype: int
|
|
55
|
+
"""
|
|
56
|
+
return self._last_update_time
|
|
57
|
+
|
|
58
|
+
@last_update_time.setter
|
|
59
|
+
def last_update_time(self, last_update_time):
|
|
60
|
+
r"""Sets the last_update_time of this Conversation.
|
|
61
|
+
|
|
62
|
+
:param last_update_time: The last_update_time of this Conversation.
|
|
63
|
+
:type last_update_time: int
|
|
64
|
+
"""
|
|
65
|
+
self._last_update_time = last_update_time
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def message_list(self):
|
|
69
|
+
r"""Gets the message_list of this Conversation.
|
|
70
|
+
|
|
71
|
+
:return: The message_list of this Conversation.
|
|
72
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
73
|
+
"""
|
|
74
|
+
return self._message_list
|
|
75
|
+
|
|
76
|
+
@message_list.setter
|
|
77
|
+
def message_list(self, message_list):
|
|
78
|
+
r"""Sets the message_list of this Conversation.
|
|
79
|
+
|
|
80
|
+
:param message_list: The message_list of this Conversation.
|
|
81
|
+
:type message_list: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
82
|
+
"""
|
|
83
|
+
self._message_list = message_list
|
|
84
|
+
|
|
85
|
+
def to_dict(self):
|
|
86
|
+
result = {}
|
|
87
|
+
|
|
88
|
+
for attr, _ in self.openapi_types.items():
|
|
89
|
+
value = getattr(self, attr)
|
|
90
|
+
if isinstance(value, list):
|
|
91
|
+
result[attr] = list(map(
|
|
92
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
93
|
+
value
|
|
94
|
+
))
|
|
95
|
+
elif hasattr(value, "to_dict"):
|
|
96
|
+
result[attr] = value.to_dict()
|
|
97
|
+
elif isinstance(value, dict):
|
|
98
|
+
result[attr] = dict(map(
|
|
99
|
+
lambda item: (item[0], item[1].to_dict())
|
|
100
|
+
if hasattr(item[1], "to_dict") else item,
|
|
101
|
+
value.items()
|
|
102
|
+
))
|
|
103
|
+
else:
|
|
104
|
+
if attr in self.sensitive_list:
|
|
105
|
+
result[attr] = "****"
|
|
106
|
+
else:
|
|
107
|
+
result[attr] = value
|
|
108
|
+
|
|
109
|
+
return result
|
|
110
|
+
|
|
111
|
+
def to_str(self):
|
|
112
|
+
"""Returns the string representation of the model"""
|
|
113
|
+
import simplejson as json
|
|
114
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
115
|
+
|
|
116
|
+
def __repr__(self):
|
|
117
|
+
"""For `print`"""
|
|
118
|
+
return self.to_str()
|
|
119
|
+
|
|
120
|
+
def __eq__(self, other):
|
|
121
|
+
"""Returns true if both objects are equal"""
|
|
122
|
+
if not isinstance(other, Conversation):
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
return self.__dict__ == other.__dict__
|
|
126
|
+
|
|
127
|
+
def __ne__(self, other):
|
|
128
|
+
"""Returns true if both objects are not equal"""
|
|
129
|
+
return not self == other
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FeedbackReason:
|
|
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
|
+
'tags': 'list[str]',
|
|
19
|
+
'content': 'str'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'tags': 'tags',
|
|
24
|
+
'content': 'content'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, tags=None, content=None):
|
|
28
|
+
r"""FeedbackReason
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param tags: 原因标签列表
|
|
33
|
+
:type tags: list[str]
|
|
34
|
+
:param content: 具体原因内容
|
|
35
|
+
:type content: str
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._tags = None
|
|
41
|
+
self._content = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
self.tags = tags
|
|
45
|
+
if content is not None:
|
|
46
|
+
self.content = content
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def tags(self):
|
|
50
|
+
r"""Gets the tags of this FeedbackReason.
|
|
51
|
+
|
|
52
|
+
原因标签列表
|
|
53
|
+
|
|
54
|
+
:return: The tags of this FeedbackReason.
|
|
55
|
+
:rtype: list[str]
|
|
56
|
+
"""
|
|
57
|
+
return self._tags
|
|
58
|
+
|
|
59
|
+
@tags.setter
|
|
60
|
+
def tags(self, tags):
|
|
61
|
+
r"""Sets the tags of this FeedbackReason.
|
|
62
|
+
|
|
63
|
+
原因标签列表
|
|
64
|
+
|
|
65
|
+
:param tags: The tags of this FeedbackReason.
|
|
66
|
+
:type tags: list[str]
|
|
67
|
+
"""
|
|
68
|
+
self._tags = tags
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def content(self):
|
|
72
|
+
r"""Gets the content of this FeedbackReason.
|
|
73
|
+
|
|
74
|
+
具体原因内容
|
|
75
|
+
|
|
76
|
+
:return: The content of this FeedbackReason.
|
|
77
|
+
:rtype: str
|
|
78
|
+
"""
|
|
79
|
+
return self._content
|
|
80
|
+
|
|
81
|
+
@content.setter
|
|
82
|
+
def content(self, content):
|
|
83
|
+
r"""Sets the content of this FeedbackReason.
|
|
84
|
+
|
|
85
|
+
具体原因内容
|
|
86
|
+
|
|
87
|
+
:param content: The content of this FeedbackReason.
|
|
88
|
+
:type content: str
|
|
89
|
+
"""
|
|
90
|
+
self._content = content
|
|
91
|
+
|
|
92
|
+
def to_dict(self):
|
|
93
|
+
result = {}
|
|
94
|
+
|
|
95
|
+
for attr, _ in self.openapi_types.items():
|
|
96
|
+
value = getattr(self, attr)
|
|
97
|
+
if isinstance(value, list):
|
|
98
|
+
result[attr] = list(map(
|
|
99
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
100
|
+
value
|
|
101
|
+
))
|
|
102
|
+
elif hasattr(value, "to_dict"):
|
|
103
|
+
result[attr] = value.to_dict()
|
|
104
|
+
elif isinstance(value, dict):
|
|
105
|
+
result[attr] = dict(map(
|
|
106
|
+
lambda item: (item[0], item[1].to_dict())
|
|
107
|
+
if hasattr(item[1], "to_dict") else item,
|
|
108
|
+
value.items()
|
|
109
|
+
))
|
|
110
|
+
else:
|
|
111
|
+
if attr in self.sensitive_list:
|
|
112
|
+
result[attr] = "****"
|
|
113
|
+
else:
|
|
114
|
+
result[attr] = value
|
|
115
|
+
|
|
116
|
+
return result
|
|
117
|
+
|
|
118
|
+
def to_str(self):
|
|
119
|
+
"""Returns the string representation of the model"""
|
|
120
|
+
import simplejson as json
|
|
121
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
122
|
+
|
|
123
|
+
def __repr__(self):
|
|
124
|
+
"""For `print`"""
|
|
125
|
+
return self.to_str()
|
|
126
|
+
|
|
127
|
+
def __eq__(self, other):
|
|
128
|
+
"""Returns true if both objects are equal"""
|
|
129
|
+
if not isinstance(other, FeedbackReason):
|
|
130
|
+
return False
|
|
131
|
+
|
|
132
|
+
return self.__dict__ == other.__dict__
|
|
133
|
+
|
|
134
|
+
def __ne__(self, other):
|
|
135
|
+
"""Returns true if both objects are not equal"""
|
|
136
|
+
return not self == other
|