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,170 @@
|
|
|
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 UploadAgentFileResponse(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
|
+
'url': 'str',
|
|
20
|
+
'headers': 'dict(str, str)',
|
|
21
|
+
'file_name': 'str'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'url': 'url',
|
|
26
|
+
'headers': 'headers',
|
|
27
|
+
'file_name': 'file_name'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
def __init__(self, url=None, headers=None, file_name=None):
|
|
31
|
+
r"""UploadAgentFileResponse
|
|
32
|
+
|
|
33
|
+
The model defined in huaweicloud sdk
|
|
34
|
+
|
|
35
|
+
:param url: 临时url
|
|
36
|
+
:type url: str
|
|
37
|
+
:param headers: headers
|
|
38
|
+
:type headers: dict(str, str)
|
|
39
|
+
:param file_name: 文件名
|
|
40
|
+
:type file_name: str
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
super().__init__()
|
|
44
|
+
|
|
45
|
+
self._url = None
|
|
46
|
+
self._headers = None
|
|
47
|
+
self._file_name = None
|
|
48
|
+
self.discriminator = None
|
|
49
|
+
|
|
50
|
+
if url is not None:
|
|
51
|
+
self.url = url
|
|
52
|
+
if headers is not None:
|
|
53
|
+
self.headers = headers
|
|
54
|
+
if file_name is not None:
|
|
55
|
+
self.file_name = file_name
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def url(self):
|
|
59
|
+
r"""Gets the url of this UploadAgentFileResponse.
|
|
60
|
+
|
|
61
|
+
临时url
|
|
62
|
+
|
|
63
|
+
:return: The url of this UploadAgentFileResponse.
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._url
|
|
67
|
+
|
|
68
|
+
@url.setter
|
|
69
|
+
def url(self, url):
|
|
70
|
+
r"""Sets the url of this UploadAgentFileResponse.
|
|
71
|
+
|
|
72
|
+
临时url
|
|
73
|
+
|
|
74
|
+
:param url: The url of this UploadAgentFileResponse.
|
|
75
|
+
:type url: str
|
|
76
|
+
"""
|
|
77
|
+
self._url = url
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def headers(self):
|
|
81
|
+
r"""Gets the headers of this UploadAgentFileResponse.
|
|
82
|
+
|
|
83
|
+
headers
|
|
84
|
+
|
|
85
|
+
:return: The headers of this UploadAgentFileResponse.
|
|
86
|
+
:rtype: dict(str, str)
|
|
87
|
+
"""
|
|
88
|
+
return self._headers
|
|
89
|
+
|
|
90
|
+
@headers.setter
|
|
91
|
+
def headers(self, headers):
|
|
92
|
+
r"""Sets the headers of this UploadAgentFileResponse.
|
|
93
|
+
|
|
94
|
+
headers
|
|
95
|
+
|
|
96
|
+
:param headers: The headers of this UploadAgentFileResponse.
|
|
97
|
+
:type headers: dict(str, str)
|
|
98
|
+
"""
|
|
99
|
+
self._headers = headers
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def file_name(self):
|
|
103
|
+
r"""Gets the file_name of this UploadAgentFileResponse.
|
|
104
|
+
|
|
105
|
+
文件名
|
|
106
|
+
|
|
107
|
+
:return: The file_name of this UploadAgentFileResponse.
|
|
108
|
+
:rtype: str
|
|
109
|
+
"""
|
|
110
|
+
return self._file_name
|
|
111
|
+
|
|
112
|
+
@file_name.setter
|
|
113
|
+
def file_name(self, file_name):
|
|
114
|
+
r"""Sets the file_name of this UploadAgentFileResponse.
|
|
115
|
+
|
|
116
|
+
文件名
|
|
117
|
+
|
|
118
|
+
:param file_name: The file_name of this UploadAgentFileResponse.
|
|
119
|
+
:type file_name: str
|
|
120
|
+
"""
|
|
121
|
+
self._file_name = file_name
|
|
122
|
+
|
|
123
|
+
def to_dict(self):
|
|
124
|
+
import warnings
|
|
125
|
+
warnings.warn("UploadAgentFileResponse.to_dict() is deprecated and no longer maintained, "
|
|
126
|
+
"use to_json_object() to get the response content.", DeprecationWarning)
|
|
127
|
+
result = {}
|
|
128
|
+
|
|
129
|
+
for attr, _ in self.openapi_types.items():
|
|
130
|
+
value = getattr(self, attr)
|
|
131
|
+
if isinstance(value, list):
|
|
132
|
+
result[attr] = list(map(
|
|
133
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
134
|
+
value
|
|
135
|
+
))
|
|
136
|
+
elif hasattr(value, "to_dict"):
|
|
137
|
+
result[attr] = value.to_dict()
|
|
138
|
+
elif isinstance(value, dict):
|
|
139
|
+
result[attr] = dict(map(
|
|
140
|
+
lambda item: (item[0], item[1].to_dict())
|
|
141
|
+
if hasattr(item[1], "to_dict") else item,
|
|
142
|
+
value.items()
|
|
143
|
+
))
|
|
144
|
+
else:
|
|
145
|
+
if attr in self.sensitive_list:
|
|
146
|
+
result[attr] = "****"
|
|
147
|
+
else:
|
|
148
|
+
result[attr] = value
|
|
149
|
+
|
|
150
|
+
return result
|
|
151
|
+
|
|
152
|
+
def to_str(self):
|
|
153
|
+
"""Returns the string representation of the model"""
|
|
154
|
+
import simplejson as json
|
|
155
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
156
|
+
|
|
157
|
+
def __repr__(self):
|
|
158
|
+
"""For `print`"""
|
|
159
|
+
return self.to_str()
|
|
160
|
+
|
|
161
|
+
def __eq__(self, other):
|
|
162
|
+
"""Returns true if both objects are equal"""
|
|
163
|
+
if not isinstance(other, UploadAgentFileResponse):
|
|
164
|
+
return False
|
|
165
|
+
|
|
166
|
+
return self.__dict__ == other.__dict__
|
|
167
|
+
|
|
168
|
+
def __ne__(self, other):
|
|
169
|
+
"""Returns true if both objects are not equal"""
|
|
170
|
+
return not self == other
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UserProfile:
|
|
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
|
+
'enable_retrieve': 'bool',
|
|
19
|
+
'enable_extract': 'bool'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'enable_retrieve': 'enable_retrieve',
|
|
24
|
+
'enable_extract': 'enable_extract'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, enable_retrieve=None, enable_extract=None):
|
|
28
|
+
r"""UserProfile
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param enable_retrieve: 运行时, 是否读取用户画像
|
|
33
|
+
:type enable_retrieve: bool
|
|
34
|
+
:param enable_extract: 运行时, 是否构建用户画像
|
|
35
|
+
:type enable_extract: bool
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._enable_retrieve = None
|
|
41
|
+
self._enable_extract = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
if enable_retrieve is not None:
|
|
45
|
+
self.enable_retrieve = enable_retrieve
|
|
46
|
+
if enable_extract is not None:
|
|
47
|
+
self.enable_extract = enable_extract
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def enable_retrieve(self):
|
|
51
|
+
r"""Gets the enable_retrieve of this UserProfile.
|
|
52
|
+
|
|
53
|
+
运行时, 是否读取用户画像
|
|
54
|
+
|
|
55
|
+
:return: The enable_retrieve of this UserProfile.
|
|
56
|
+
:rtype: bool
|
|
57
|
+
"""
|
|
58
|
+
return self._enable_retrieve
|
|
59
|
+
|
|
60
|
+
@enable_retrieve.setter
|
|
61
|
+
def enable_retrieve(self, enable_retrieve):
|
|
62
|
+
r"""Sets the enable_retrieve of this UserProfile.
|
|
63
|
+
|
|
64
|
+
运行时, 是否读取用户画像
|
|
65
|
+
|
|
66
|
+
:param enable_retrieve: The enable_retrieve of this UserProfile.
|
|
67
|
+
:type enable_retrieve: bool
|
|
68
|
+
"""
|
|
69
|
+
self._enable_retrieve = enable_retrieve
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def enable_extract(self):
|
|
73
|
+
r"""Gets the enable_extract of this UserProfile.
|
|
74
|
+
|
|
75
|
+
运行时, 是否构建用户画像
|
|
76
|
+
|
|
77
|
+
:return: The enable_extract of this UserProfile.
|
|
78
|
+
:rtype: bool
|
|
79
|
+
"""
|
|
80
|
+
return self._enable_extract
|
|
81
|
+
|
|
82
|
+
@enable_extract.setter
|
|
83
|
+
def enable_extract(self, enable_extract):
|
|
84
|
+
r"""Sets the enable_extract of this UserProfile.
|
|
85
|
+
|
|
86
|
+
运行时, 是否构建用户画像
|
|
87
|
+
|
|
88
|
+
:param enable_extract: The enable_extract of this UserProfile.
|
|
89
|
+
:type enable_extract: bool
|
|
90
|
+
"""
|
|
91
|
+
self._enable_extract = enable_extract
|
|
92
|
+
|
|
93
|
+
def to_dict(self):
|
|
94
|
+
result = {}
|
|
95
|
+
|
|
96
|
+
for attr, _ in self.openapi_types.items():
|
|
97
|
+
value = getattr(self, attr)
|
|
98
|
+
if isinstance(value, list):
|
|
99
|
+
result[attr] = list(map(
|
|
100
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
101
|
+
value
|
|
102
|
+
))
|
|
103
|
+
elif hasattr(value, "to_dict"):
|
|
104
|
+
result[attr] = value.to_dict()
|
|
105
|
+
elif isinstance(value, dict):
|
|
106
|
+
result[attr] = dict(map(
|
|
107
|
+
lambda item: (item[0], item[1].to_dict())
|
|
108
|
+
if hasattr(item[1], "to_dict") else item,
|
|
109
|
+
value.items()
|
|
110
|
+
))
|
|
111
|
+
else:
|
|
112
|
+
if attr in self.sensitive_list:
|
|
113
|
+
result[attr] = "****"
|
|
114
|
+
else:
|
|
115
|
+
result[attr] = value
|
|
116
|
+
|
|
117
|
+
return result
|
|
118
|
+
|
|
119
|
+
def to_str(self):
|
|
120
|
+
"""Returns the string representation of the model"""
|
|
121
|
+
import simplejson as json
|
|
122
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
123
|
+
|
|
124
|
+
def __repr__(self):
|
|
125
|
+
"""For `print`"""
|
|
126
|
+
return self.to_str()
|
|
127
|
+
|
|
128
|
+
def __eq__(self, other):
|
|
129
|
+
"""Returns true if both objects are equal"""
|
|
130
|
+
if not isinstance(other, UserProfile):
|
|
131
|
+
return False
|
|
132
|
+
|
|
133
|
+
return self.__dict__ == other.__dict__
|
|
134
|
+
|
|
135
|
+
def __ne__(self, other):
|
|
136
|
+
"""Returns true if both objects are not equal"""
|
|
137
|
+
return not self == other
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class WorkflowRunReq:
|
|
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
|
+
'inputs': 'dict(str, object)',
|
|
19
|
+
'memory_inputs': 'dict(str, object)',
|
|
20
|
+
'globals': 'dict(str, object)',
|
|
21
|
+
'messages': 'list[Message]',
|
|
22
|
+
'user_profile': 'UserProfile',
|
|
23
|
+
'plugin_configs': 'list[PluginConfig]',
|
|
24
|
+
'version': 'int',
|
|
25
|
+
'user_id': 'str',
|
|
26
|
+
'conversation': 'Conversation',
|
|
27
|
+
'enable_history': 'bool'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
attribute_map = {
|
|
31
|
+
'inputs': 'inputs',
|
|
32
|
+
'memory_inputs': 'memory_inputs',
|
|
33
|
+
'globals': 'globals',
|
|
34
|
+
'messages': 'messages',
|
|
35
|
+
'user_profile': 'user_profile',
|
|
36
|
+
'plugin_configs': 'plugin_configs',
|
|
37
|
+
'version': 'version',
|
|
38
|
+
'user_id': 'userId',
|
|
39
|
+
'conversation': 'conversation',
|
|
40
|
+
'enable_history': 'enable_history'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
def __init__(self, inputs=None, memory_inputs=None, globals=None, messages=None, user_profile=None, plugin_configs=None, version=None, user_id=None, conversation=None, enable_history=None):
|
|
44
|
+
r"""WorkflowRunReq
|
|
45
|
+
|
|
46
|
+
The model defined in huaweicloud sdk
|
|
47
|
+
|
|
48
|
+
:param inputs:
|
|
49
|
+
:type inputs: dict(str, object)
|
|
50
|
+
:param memory_inputs:
|
|
51
|
+
:type memory_inputs: dict(str, object)
|
|
52
|
+
:param globals:
|
|
53
|
+
:type globals: dict(str, object)
|
|
54
|
+
:param messages: user消息
|
|
55
|
+
:type messages: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
56
|
+
:param user_profile:
|
|
57
|
+
:type user_profile: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
58
|
+
:param plugin_configs: 插件参数数组
|
|
59
|
+
:type plugin_configs: list[:class:`huaweicloudsdkversatile.v1.PluginConfig`]
|
|
60
|
+
:param version:
|
|
61
|
+
:type version: int
|
|
62
|
+
:param user_id: 用户ID
|
|
63
|
+
:type user_id: str
|
|
64
|
+
:param conversation:
|
|
65
|
+
:type conversation: :class:`huaweicloudsdkversatile.v1.Conversation`
|
|
66
|
+
:param enable_history: 会话历史写入
|
|
67
|
+
:type enable_history: bool
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
self._inputs = None
|
|
73
|
+
self._memory_inputs = None
|
|
74
|
+
self._globals = None
|
|
75
|
+
self._messages = None
|
|
76
|
+
self._user_profile = None
|
|
77
|
+
self._plugin_configs = None
|
|
78
|
+
self._version = None
|
|
79
|
+
self._user_id = None
|
|
80
|
+
self._conversation = None
|
|
81
|
+
self._enable_history = None
|
|
82
|
+
self.discriminator = None
|
|
83
|
+
|
|
84
|
+
self.inputs = inputs
|
|
85
|
+
if memory_inputs is not None:
|
|
86
|
+
self.memory_inputs = memory_inputs
|
|
87
|
+
if globals is not None:
|
|
88
|
+
self.globals = globals
|
|
89
|
+
if messages is not None:
|
|
90
|
+
self.messages = messages
|
|
91
|
+
if user_profile is not None:
|
|
92
|
+
self.user_profile = user_profile
|
|
93
|
+
if plugin_configs is not None:
|
|
94
|
+
self.plugin_configs = plugin_configs
|
|
95
|
+
if version is not None:
|
|
96
|
+
self.version = version
|
|
97
|
+
if user_id is not None:
|
|
98
|
+
self.user_id = user_id
|
|
99
|
+
if conversation is not None:
|
|
100
|
+
self.conversation = conversation
|
|
101
|
+
if enable_history is not None:
|
|
102
|
+
self.enable_history = enable_history
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def inputs(self):
|
|
106
|
+
r"""Gets the inputs of this WorkflowRunReq.
|
|
107
|
+
|
|
108
|
+
:return: The inputs of this WorkflowRunReq.
|
|
109
|
+
:rtype: dict(str, object)
|
|
110
|
+
"""
|
|
111
|
+
return self._inputs
|
|
112
|
+
|
|
113
|
+
@inputs.setter
|
|
114
|
+
def inputs(self, inputs):
|
|
115
|
+
r"""Sets the inputs of this WorkflowRunReq.
|
|
116
|
+
|
|
117
|
+
:param inputs: The inputs of this WorkflowRunReq.
|
|
118
|
+
:type inputs: dict(str, object)
|
|
119
|
+
"""
|
|
120
|
+
self._inputs = inputs
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def memory_inputs(self):
|
|
124
|
+
r"""Gets the memory_inputs of this WorkflowRunReq.
|
|
125
|
+
|
|
126
|
+
:return: The memory_inputs of this WorkflowRunReq.
|
|
127
|
+
:rtype: dict(str, object)
|
|
128
|
+
"""
|
|
129
|
+
return self._memory_inputs
|
|
130
|
+
|
|
131
|
+
@memory_inputs.setter
|
|
132
|
+
def memory_inputs(self, memory_inputs):
|
|
133
|
+
r"""Sets the memory_inputs of this WorkflowRunReq.
|
|
134
|
+
|
|
135
|
+
:param memory_inputs: The memory_inputs of this WorkflowRunReq.
|
|
136
|
+
:type memory_inputs: dict(str, object)
|
|
137
|
+
"""
|
|
138
|
+
self._memory_inputs = memory_inputs
|
|
139
|
+
|
|
140
|
+
@property
|
|
141
|
+
def globals(self):
|
|
142
|
+
r"""Gets the globals of this WorkflowRunReq.
|
|
143
|
+
|
|
144
|
+
:return: The globals of this WorkflowRunReq.
|
|
145
|
+
:rtype: dict(str, object)
|
|
146
|
+
"""
|
|
147
|
+
return self._globals
|
|
148
|
+
|
|
149
|
+
@globals.setter
|
|
150
|
+
def globals(self, globals):
|
|
151
|
+
r"""Sets the globals of this WorkflowRunReq.
|
|
152
|
+
|
|
153
|
+
:param globals: The globals of this WorkflowRunReq.
|
|
154
|
+
:type globals: dict(str, object)
|
|
155
|
+
"""
|
|
156
|
+
self._globals = globals
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def messages(self):
|
|
160
|
+
r"""Gets the messages of this WorkflowRunReq.
|
|
161
|
+
|
|
162
|
+
user消息
|
|
163
|
+
|
|
164
|
+
:return: The messages of this WorkflowRunReq.
|
|
165
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
166
|
+
"""
|
|
167
|
+
return self._messages
|
|
168
|
+
|
|
169
|
+
@messages.setter
|
|
170
|
+
def messages(self, messages):
|
|
171
|
+
r"""Sets the messages of this WorkflowRunReq.
|
|
172
|
+
|
|
173
|
+
user消息
|
|
174
|
+
|
|
175
|
+
:param messages: The messages of this WorkflowRunReq.
|
|
176
|
+
:type messages: list[:class:`huaweicloudsdkversatile.v1.Message`]
|
|
177
|
+
"""
|
|
178
|
+
self._messages = messages
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def user_profile(self):
|
|
182
|
+
r"""Gets the user_profile of this WorkflowRunReq.
|
|
183
|
+
|
|
184
|
+
:return: The user_profile of this WorkflowRunReq.
|
|
185
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
186
|
+
"""
|
|
187
|
+
return self._user_profile
|
|
188
|
+
|
|
189
|
+
@user_profile.setter
|
|
190
|
+
def user_profile(self, user_profile):
|
|
191
|
+
r"""Sets the user_profile of this WorkflowRunReq.
|
|
192
|
+
|
|
193
|
+
:param user_profile: The user_profile of this WorkflowRunReq.
|
|
194
|
+
:type user_profile: :class:`huaweicloudsdkversatile.v1.UserProfile`
|
|
195
|
+
"""
|
|
196
|
+
self._user_profile = user_profile
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
def plugin_configs(self):
|
|
200
|
+
r"""Gets the plugin_configs of this WorkflowRunReq.
|
|
201
|
+
|
|
202
|
+
插件参数数组
|
|
203
|
+
|
|
204
|
+
:return: The plugin_configs of this WorkflowRunReq.
|
|
205
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.PluginConfig`]
|
|
206
|
+
"""
|
|
207
|
+
return self._plugin_configs
|
|
208
|
+
|
|
209
|
+
@plugin_configs.setter
|
|
210
|
+
def plugin_configs(self, plugin_configs):
|
|
211
|
+
r"""Sets the plugin_configs of this WorkflowRunReq.
|
|
212
|
+
|
|
213
|
+
插件参数数组
|
|
214
|
+
|
|
215
|
+
:param plugin_configs: The plugin_configs of this WorkflowRunReq.
|
|
216
|
+
:type plugin_configs: list[:class:`huaweicloudsdkversatile.v1.PluginConfig`]
|
|
217
|
+
"""
|
|
218
|
+
self._plugin_configs = plugin_configs
|
|
219
|
+
|
|
220
|
+
@property
|
|
221
|
+
def version(self):
|
|
222
|
+
r"""Gets the version of this WorkflowRunReq.
|
|
223
|
+
|
|
224
|
+
:return: The version of this WorkflowRunReq.
|
|
225
|
+
:rtype: int
|
|
226
|
+
"""
|
|
227
|
+
return self._version
|
|
228
|
+
|
|
229
|
+
@version.setter
|
|
230
|
+
def version(self, version):
|
|
231
|
+
r"""Sets the version of this WorkflowRunReq.
|
|
232
|
+
|
|
233
|
+
:param version: The version of this WorkflowRunReq.
|
|
234
|
+
:type version: int
|
|
235
|
+
"""
|
|
236
|
+
self._version = version
|
|
237
|
+
|
|
238
|
+
@property
|
|
239
|
+
def user_id(self):
|
|
240
|
+
r"""Gets the user_id of this WorkflowRunReq.
|
|
241
|
+
|
|
242
|
+
用户ID
|
|
243
|
+
|
|
244
|
+
:return: The user_id of this WorkflowRunReq.
|
|
245
|
+
:rtype: str
|
|
246
|
+
"""
|
|
247
|
+
return self._user_id
|
|
248
|
+
|
|
249
|
+
@user_id.setter
|
|
250
|
+
def user_id(self, user_id):
|
|
251
|
+
r"""Sets the user_id of this WorkflowRunReq.
|
|
252
|
+
|
|
253
|
+
用户ID
|
|
254
|
+
|
|
255
|
+
:param user_id: The user_id of this WorkflowRunReq.
|
|
256
|
+
:type user_id: str
|
|
257
|
+
"""
|
|
258
|
+
self._user_id = user_id
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def conversation(self):
|
|
262
|
+
r"""Gets the conversation of this WorkflowRunReq.
|
|
263
|
+
|
|
264
|
+
:return: The conversation of this WorkflowRunReq.
|
|
265
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.Conversation`
|
|
266
|
+
"""
|
|
267
|
+
return self._conversation
|
|
268
|
+
|
|
269
|
+
@conversation.setter
|
|
270
|
+
def conversation(self, conversation):
|
|
271
|
+
r"""Sets the conversation of this WorkflowRunReq.
|
|
272
|
+
|
|
273
|
+
:param conversation: The conversation of this WorkflowRunReq.
|
|
274
|
+
:type conversation: :class:`huaweicloudsdkversatile.v1.Conversation`
|
|
275
|
+
"""
|
|
276
|
+
self._conversation = conversation
|
|
277
|
+
|
|
278
|
+
@property
|
|
279
|
+
def enable_history(self):
|
|
280
|
+
r"""Gets the enable_history of this WorkflowRunReq.
|
|
281
|
+
|
|
282
|
+
会话历史写入
|
|
283
|
+
|
|
284
|
+
:return: The enable_history of this WorkflowRunReq.
|
|
285
|
+
:rtype: bool
|
|
286
|
+
"""
|
|
287
|
+
return self._enable_history
|
|
288
|
+
|
|
289
|
+
@enable_history.setter
|
|
290
|
+
def enable_history(self, enable_history):
|
|
291
|
+
r"""Sets the enable_history of this WorkflowRunReq.
|
|
292
|
+
|
|
293
|
+
会话历史写入
|
|
294
|
+
|
|
295
|
+
:param enable_history: The enable_history of this WorkflowRunReq.
|
|
296
|
+
:type enable_history: bool
|
|
297
|
+
"""
|
|
298
|
+
self._enable_history = enable_history
|
|
299
|
+
|
|
300
|
+
def to_dict(self):
|
|
301
|
+
result = {}
|
|
302
|
+
|
|
303
|
+
for attr, _ in self.openapi_types.items():
|
|
304
|
+
value = getattr(self, attr)
|
|
305
|
+
if isinstance(value, list):
|
|
306
|
+
result[attr] = list(map(
|
|
307
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
308
|
+
value
|
|
309
|
+
))
|
|
310
|
+
elif hasattr(value, "to_dict"):
|
|
311
|
+
result[attr] = value.to_dict()
|
|
312
|
+
elif isinstance(value, dict):
|
|
313
|
+
result[attr] = dict(map(
|
|
314
|
+
lambda item: (item[0], item[1].to_dict())
|
|
315
|
+
if hasattr(item[1], "to_dict") else item,
|
|
316
|
+
value.items()
|
|
317
|
+
))
|
|
318
|
+
else:
|
|
319
|
+
if attr in self.sensitive_list:
|
|
320
|
+
result[attr] = "****"
|
|
321
|
+
else:
|
|
322
|
+
result[attr] = value
|
|
323
|
+
|
|
324
|
+
return result
|
|
325
|
+
|
|
326
|
+
def to_str(self):
|
|
327
|
+
"""Returns the string representation of the model"""
|
|
328
|
+
import simplejson as json
|
|
329
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
330
|
+
|
|
331
|
+
def __repr__(self):
|
|
332
|
+
"""For `print`"""
|
|
333
|
+
return self.to_str()
|
|
334
|
+
|
|
335
|
+
def __eq__(self, other):
|
|
336
|
+
"""Returns true if both objects are equal"""
|
|
337
|
+
if not isinstance(other, WorkflowRunReq):
|
|
338
|
+
return False
|
|
339
|
+
|
|
340
|
+
return self.__dict__ == other.__dict__
|
|
341
|
+
|
|
342
|
+
def __ne__(self, other):
|
|
343
|
+
"""Returns true if both objects are not equal"""
|
|
344
|
+
return not self == other
|