huaweicloudsdkosm 3.1.163__py3-none-any.whl → 3.1.165__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.
Potentially problematic release.
This version of huaweicloudsdkosm might be problematic. Click here for more details.
- huaweicloudsdkosm/v2/__init__.py +0 -60
- huaweicloudsdkosm/v2/model/__init__.py +0 -60
- huaweicloudsdkosm/v2/osm_async_client.py +45 -1130
- huaweicloudsdkosm/v2/osm_client.py +45 -1130
- {huaweicloudsdkosm-3.1.163.dist-info → huaweicloudsdkosm-3.1.165.dist-info}/METADATA +2 -2
- {huaweicloudsdkosm-3.1.163.dist-info → huaweicloudsdkosm-3.1.165.dist-info}/RECORD +9 -69
- huaweicloudsdkosm/v2/model/answer.py +0 -227
- huaweicloudsdkosm/v2/model/answer_detail.py +0 -194
- huaweicloudsdkosm/v2/model/answer_info.py +0 -231
- huaweicloudsdkosm/v2/model/answer_qa_pair.py +0 -318
- huaweicloudsdkosm/v2/model/article.py +0 -347
- huaweicloudsdkosm/v2/model/ask_question_req.py +0 -316
- huaweicloudsdkosm/v2/model/cbs_flow_entry.py +0 -144
- huaweicloudsdkosm/v2/model/create_ask_question_request.py +0 -197
- huaweicloudsdkosm/v2/model/create_ask_question_response.py +0 -232
- huaweicloudsdkosm/v2/model/create_evaluate_request.py +0 -253
- huaweicloudsdkosm/v2/model/create_evaluate_response.py +0 -174
- huaweicloudsdkosm/v2/model/create_qa_ask_request.py +0 -197
- huaweicloudsdkosm/v2/model/create_qa_ask_response.py +0 -282
- huaweicloudsdkosm/v2/model/create_qa_feedbacks_request.py +0 -226
- huaweicloudsdkosm/v2/model/create_qa_feedbacks_response.py +0 -174
- huaweicloudsdkosm/v2/model/create_question_in_session_request.py +0 -225
- huaweicloudsdkosm/v2/model/create_question_in_session_response.py +0 -232
- huaweicloudsdkosm/v2/model/create_session_request.py +0 -172
- huaweicloudsdkosm/v2/model/create_session_response.py +0 -174
- huaweicloudsdkosm/v2/model/evaluate_request_req.py +0 -115
- huaweicloudsdkosm/v2/model/extend_question.py +0 -144
- huaweicloudsdkosm/v2/model/feedback_option.py +0 -144
- huaweicloudsdkosm/v2/model/lang_result.py +0 -144
- huaweicloudsdkosm/v2/model/list_articles_request.py +0 -226
- huaweicloudsdkosm/v2/model/list_articles_response.py +0 -174
- huaweicloudsdkosm/v2/model/list_feedback_option_request.py +0 -230
- huaweicloudsdkosm/v2/model/list_feedback_option_response.py +0 -174
- huaweicloudsdkosm/v2/model/list_notices_request.py +0 -198
- huaweicloudsdkosm/v2/model/list_notices_response.py +0 -174
- huaweicloudsdkosm/v2/model/list_recommend_words_request.py +0 -260
- huaweicloudsdkosm/v2/model/list_recommend_words_response.py +0 -203
- huaweicloudsdkosm/v2/model/list_tools_request.py +0 -198
- huaweicloudsdkosm/v2/model/list_tools_response.py +0 -174
- huaweicloudsdkosm/v2/model/notice.py +0 -199
- huaweicloudsdkosm/v2/model/qa_ask_req.py +0 -346
- huaweicloudsdkosm/v2/model/qa_feedback_req.py +0 -345
- huaweicloudsdkosm/v2/model/qa_flow_hit_node_vo.py +0 -202
- huaweicloudsdkosm/v2/model/qa_flow_hit_result.py +0 -198
- huaweicloudsdkosm/v2/model/qa_graph_answer.py +0 -202
- huaweicloudsdkosm/v2/model/qa_pair.py +0 -289
- huaweicloudsdkosm/v2/model/qabot_answer.py +0 -347
- huaweicloudsdkosm/v2/model/query_associated_question_req.py +0 -172
- huaweicloudsdkosm/v2/model/recommend_word.py +0 -285
- huaweicloudsdkosm/v2/model/relation_theme.py +0 -144
- huaweicloudsdkosm/v2/model/relevance_qapair.py +0 -173
- huaweicloudsdkosm/v2/model/search_articles_req.py +0 -201
- huaweicloudsdkosm/v2/model/search_notices_req.py +0 -143
- huaweicloudsdkosm/v2/model/search_qa_pairs_req.py +0 -144
- huaweicloudsdkosm/v2/model/search_tools_req.py +0 -201
- huaweicloudsdkosm/v2/model/session_ask_question_req.py +0 -288
- huaweicloudsdkosm/v2/model/show_associated_questions_request.py +0 -197
- huaweicloudsdkosm/v2/model/show_associated_questions_response.py +0 -174
- huaweicloudsdkosm/v2/model/show_qa_pair_detail_request.py +0 -200
- huaweicloudsdkosm/v2/model/show_qa_pair_detail_response.py +0 -170
- huaweicloudsdkosm/v2/model/show_qa_pairs_request.py +0 -225
- huaweicloudsdkosm/v2/model/show_qa_pairs_response.py +0 -174
- huaweicloudsdkosm/v2/model/show_theme_request.py +0 -259
- huaweicloudsdkosm/v2/model/show_theme_response.py +0 -232
- huaweicloudsdkosm/v2/model/simple_qa_pair.py +0 -173
- huaweicloudsdkosm/v2/model/tool.py +0 -287
- {huaweicloudsdkosm-3.1.163.dist-info → huaweicloudsdkosm-3.1.165.dist-info}/LICENSE +0 -0
- {huaweicloudsdkosm-3.1.163.dist-info → huaweicloudsdkosm-3.1.165.dist-info}/WHEEL +0 -0
- {huaweicloudsdkosm-3.1.163.dist-info → huaweicloudsdkosm-3.1.165.dist-info}/top_level.txt +0 -0
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
import six
|
|
4
|
-
|
|
5
|
-
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class QaPair:
|
|
9
|
-
|
|
10
|
-
"""
|
|
11
|
-
Attributes:
|
|
12
|
-
openapi_types (dict): The key is attribute name
|
|
13
|
-
and the value is attribute type.
|
|
14
|
-
attribute_map (dict): The key is attribute name
|
|
15
|
-
and the value is json key in definition.
|
|
16
|
-
"""
|
|
17
|
-
sensitive_list = []
|
|
18
|
-
|
|
19
|
-
openapi_types = {
|
|
20
|
-
'domain': 'str',
|
|
21
|
-
'link': 'str',
|
|
22
|
-
'question': 'str',
|
|
23
|
-
'answers': 'list[Answer]',
|
|
24
|
-
'qa_pair_id': 'str',
|
|
25
|
-
'ex_questions': 'list[ExtendQuestion]',
|
|
26
|
-
'related_question_ids': 'list[str]'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
attribute_map = {
|
|
30
|
-
'domain': 'domain',
|
|
31
|
-
'link': 'link',
|
|
32
|
-
'question': 'question',
|
|
33
|
-
'answers': 'answers',
|
|
34
|
-
'qa_pair_id': 'qa_pair_id',
|
|
35
|
-
'ex_questions': 'ex_questions',
|
|
36
|
-
'related_question_ids': 'related_question_ids'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
def __init__(self, domain=None, link=None, question=None, answers=None, qa_pair_id=None, ex_questions=None, related_question_ids=None):
|
|
40
|
-
r"""QaPair
|
|
41
|
-
|
|
42
|
-
The model defined in huaweicloud sdk
|
|
43
|
-
|
|
44
|
-
:param domain: 主题
|
|
45
|
-
:type domain: str
|
|
46
|
-
:param link: 链接
|
|
47
|
-
:type link: str
|
|
48
|
-
:param question: 问题
|
|
49
|
-
:type question: str
|
|
50
|
-
:param answers: 答案列表
|
|
51
|
-
:type answers: list[:class:`huaweicloudsdkosm.v2.Answer`]
|
|
52
|
-
:param qa_pair_id: 语料Id
|
|
53
|
-
:type qa_pair_id: str
|
|
54
|
-
:param ex_questions: 扩展问题列表
|
|
55
|
-
:type ex_questions: list[:class:`huaweicloudsdkosm.v2.ExtendQuestion`]
|
|
56
|
-
:param related_question_ids: 相关问题列表
|
|
57
|
-
:type related_question_ids: list[str]
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
self._domain = None
|
|
63
|
-
self._link = None
|
|
64
|
-
self._question = None
|
|
65
|
-
self._answers = None
|
|
66
|
-
self._qa_pair_id = None
|
|
67
|
-
self._ex_questions = None
|
|
68
|
-
self._related_question_ids = None
|
|
69
|
-
self.discriminator = None
|
|
70
|
-
|
|
71
|
-
if domain is not None:
|
|
72
|
-
self.domain = domain
|
|
73
|
-
if link is not None:
|
|
74
|
-
self.link = link
|
|
75
|
-
if question is not None:
|
|
76
|
-
self.question = question
|
|
77
|
-
if answers is not None:
|
|
78
|
-
self.answers = answers
|
|
79
|
-
if qa_pair_id is not None:
|
|
80
|
-
self.qa_pair_id = qa_pair_id
|
|
81
|
-
if ex_questions is not None:
|
|
82
|
-
self.ex_questions = ex_questions
|
|
83
|
-
if related_question_ids is not None:
|
|
84
|
-
self.related_question_ids = related_question_ids
|
|
85
|
-
|
|
86
|
-
@property
|
|
87
|
-
def domain(self):
|
|
88
|
-
r"""Gets the domain of this QaPair.
|
|
89
|
-
|
|
90
|
-
主题
|
|
91
|
-
|
|
92
|
-
:return: The domain of this QaPair.
|
|
93
|
-
:rtype: str
|
|
94
|
-
"""
|
|
95
|
-
return self._domain
|
|
96
|
-
|
|
97
|
-
@domain.setter
|
|
98
|
-
def domain(self, domain):
|
|
99
|
-
r"""Sets the domain of this QaPair.
|
|
100
|
-
|
|
101
|
-
主题
|
|
102
|
-
|
|
103
|
-
:param domain: The domain of this QaPair.
|
|
104
|
-
:type domain: str
|
|
105
|
-
"""
|
|
106
|
-
self._domain = domain
|
|
107
|
-
|
|
108
|
-
@property
|
|
109
|
-
def link(self):
|
|
110
|
-
r"""Gets the link of this QaPair.
|
|
111
|
-
|
|
112
|
-
链接
|
|
113
|
-
|
|
114
|
-
:return: The link of this QaPair.
|
|
115
|
-
:rtype: str
|
|
116
|
-
"""
|
|
117
|
-
return self._link
|
|
118
|
-
|
|
119
|
-
@link.setter
|
|
120
|
-
def link(self, link):
|
|
121
|
-
r"""Sets the link of this QaPair.
|
|
122
|
-
|
|
123
|
-
链接
|
|
124
|
-
|
|
125
|
-
:param link: The link of this QaPair.
|
|
126
|
-
:type link: str
|
|
127
|
-
"""
|
|
128
|
-
self._link = link
|
|
129
|
-
|
|
130
|
-
@property
|
|
131
|
-
def question(self):
|
|
132
|
-
r"""Gets the question of this QaPair.
|
|
133
|
-
|
|
134
|
-
问题
|
|
135
|
-
|
|
136
|
-
:return: The question of this QaPair.
|
|
137
|
-
:rtype: str
|
|
138
|
-
"""
|
|
139
|
-
return self._question
|
|
140
|
-
|
|
141
|
-
@question.setter
|
|
142
|
-
def question(self, question):
|
|
143
|
-
r"""Sets the question of this QaPair.
|
|
144
|
-
|
|
145
|
-
问题
|
|
146
|
-
|
|
147
|
-
:param question: The question of this QaPair.
|
|
148
|
-
:type question: str
|
|
149
|
-
"""
|
|
150
|
-
self._question = question
|
|
151
|
-
|
|
152
|
-
@property
|
|
153
|
-
def answers(self):
|
|
154
|
-
r"""Gets the answers of this QaPair.
|
|
155
|
-
|
|
156
|
-
答案列表
|
|
157
|
-
|
|
158
|
-
:return: The answers of this QaPair.
|
|
159
|
-
:rtype: list[:class:`huaweicloudsdkosm.v2.Answer`]
|
|
160
|
-
"""
|
|
161
|
-
return self._answers
|
|
162
|
-
|
|
163
|
-
@answers.setter
|
|
164
|
-
def answers(self, answers):
|
|
165
|
-
r"""Sets the answers of this QaPair.
|
|
166
|
-
|
|
167
|
-
答案列表
|
|
168
|
-
|
|
169
|
-
:param answers: The answers of this QaPair.
|
|
170
|
-
:type answers: list[:class:`huaweicloudsdkosm.v2.Answer`]
|
|
171
|
-
"""
|
|
172
|
-
self._answers = answers
|
|
173
|
-
|
|
174
|
-
@property
|
|
175
|
-
def qa_pair_id(self):
|
|
176
|
-
r"""Gets the qa_pair_id of this QaPair.
|
|
177
|
-
|
|
178
|
-
语料Id
|
|
179
|
-
|
|
180
|
-
:return: The qa_pair_id of this QaPair.
|
|
181
|
-
:rtype: str
|
|
182
|
-
"""
|
|
183
|
-
return self._qa_pair_id
|
|
184
|
-
|
|
185
|
-
@qa_pair_id.setter
|
|
186
|
-
def qa_pair_id(self, qa_pair_id):
|
|
187
|
-
r"""Sets the qa_pair_id of this QaPair.
|
|
188
|
-
|
|
189
|
-
语料Id
|
|
190
|
-
|
|
191
|
-
:param qa_pair_id: The qa_pair_id of this QaPair.
|
|
192
|
-
:type qa_pair_id: str
|
|
193
|
-
"""
|
|
194
|
-
self._qa_pair_id = qa_pair_id
|
|
195
|
-
|
|
196
|
-
@property
|
|
197
|
-
def ex_questions(self):
|
|
198
|
-
r"""Gets the ex_questions of this QaPair.
|
|
199
|
-
|
|
200
|
-
扩展问题列表
|
|
201
|
-
|
|
202
|
-
:return: The ex_questions of this QaPair.
|
|
203
|
-
:rtype: list[:class:`huaweicloudsdkosm.v2.ExtendQuestion`]
|
|
204
|
-
"""
|
|
205
|
-
return self._ex_questions
|
|
206
|
-
|
|
207
|
-
@ex_questions.setter
|
|
208
|
-
def ex_questions(self, ex_questions):
|
|
209
|
-
r"""Sets the ex_questions of this QaPair.
|
|
210
|
-
|
|
211
|
-
扩展问题列表
|
|
212
|
-
|
|
213
|
-
:param ex_questions: The ex_questions of this QaPair.
|
|
214
|
-
:type ex_questions: list[:class:`huaweicloudsdkosm.v2.ExtendQuestion`]
|
|
215
|
-
"""
|
|
216
|
-
self._ex_questions = ex_questions
|
|
217
|
-
|
|
218
|
-
@property
|
|
219
|
-
def related_question_ids(self):
|
|
220
|
-
r"""Gets the related_question_ids of this QaPair.
|
|
221
|
-
|
|
222
|
-
相关问题列表
|
|
223
|
-
|
|
224
|
-
:return: The related_question_ids of this QaPair.
|
|
225
|
-
:rtype: list[str]
|
|
226
|
-
"""
|
|
227
|
-
return self._related_question_ids
|
|
228
|
-
|
|
229
|
-
@related_question_ids.setter
|
|
230
|
-
def related_question_ids(self, related_question_ids):
|
|
231
|
-
r"""Sets the related_question_ids of this QaPair.
|
|
232
|
-
|
|
233
|
-
相关问题列表
|
|
234
|
-
|
|
235
|
-
:param related_question_ids: The related_question_ids of this QaPair.
|
|
236
|
-
:type related_question_ids: list[str]
|
|
237
|
-
"""
|
|
238
|
-
self._related_question_ids = related_question_ids
|
|
239
|
-
|
|
240
|
-
def to_dict(self):
|
|
241
|
-
"""Returns the model properties as a dict"""
|
|
242
|
-
result = {}
|
|
243
|
-
|
|
244
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
245
|
-
value = getattr(self, attr)
|
|
246
|
-
if isinstance(value, list):
|
|
247
|
-
result[attr] = list(map(
|
|
248
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
249
|
-
value
|
|
250
|
-
))
|
|
251
|
-
elif hasattr(value, "to_dict"):
|
|
252
|
-
result[attr] = value.to_dict()
|
|
253
|
-
elif isinstance(value, dict):
|
|
254
|
-
result[attr] = dict(map(
|
|
255
|
-
lambda item: (item[0], item[1].to_dict())
|
|
256
|
-
if hasattr(item[1], "to_dict") else item,
|
|
257
|
-
value.items()
|
|
258
|
-
))
|
|
259
|
-
else:
|
|
260
|
-
if attr in self.sensitive_list:
|
|
261
|
-
result[attr] = "****"
|
|
262
|
-
else:
|
|
263
|
-
result[attr] = value
|
|
264
|
-
|
|
265
|
-
return result
|
|
266
|
-
|
|
267
|
-
def to_str(self):
|
|
268
|
-
"""Returns the string representation of the model"""
|
|
269
|
-
import simplejson as json
|
|
270
|
-
if six.PY2:
|
|
271
|
-
import sys
|
|
272
|
-
reload(sys)
|
|
273
|
-
sys.setdefaultencoding("utf-8")
|
|
274
|
-
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
275
|
-
|
|
276
|
-
def __repr__(self):
|
|
277
|
-
"""For `print`"""
|
|
278
|
-
return self.to_str()
|
|
279
|
-
|
|
280
|
-
def __eq__(self, other):
|
|
281
|
-
"""Returns true if both objects are equal"""
|
|
282
|
-
if not isinstance(other, QaPair):
|
|
283
|
-
return False
|
|
284
|
-
|
|
285
|
-
return self.__dict__ == other.__dict__
|
|
286
|
-
|
|
287
|
-
def __ne__(self, other):
|
|
288
|
-
"""Returns true if both objects are not equal"""
|
|
289
|
-
return not self == other
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
import six
|
|
4
|
-
|
|
5
|
-
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class QabotAnswer:
|
|
9
|
-
|
|
10
|
-
"""
|
|
11
|
-
Attributes:
|
|
12
|
-
openapi_types (dict): The key is attribute name
|
|
13
|
-
and the value is attribute type.
|
|
14
|
-
attribute_map (dict): The key is attribute name
|
|
15
|
-
and the value is json key in definition.
|
|
16
|
-
"""
|
|
17
|
-
sensitive_list = []
|
|
18
|
-
|
|
19
|
-
openapi_types = {
|
|
20
|
-
'question': 'str',
|
|
21
|
-
'answer': 'str',
|
|
22
|
-
'score': 'float',
|
|
23
|
-
'domain': 'str',
|
|
24
|
-
'link': 'str',
|
|
25
|
-
'qa_pair_id': 'str',
|
|
26
|
-
'domain_id': 'str',
|
|
27
|
-
'top_score_question': 'str',
|
|
28
|
-
'relevance_details': 'list[RelevanceQapair]'
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
attribute_map = {
|
|
32
|
-
'question': 'question',
|
|
33
|
-
'answer': 'answer',
|
|
34
|
-
'score': 'score',
|
|
35
|
-
'domain': 'domain',
|
|
36
|
-
'link': 'link',
|
|
37
|
-
'qa_pair_id': 'qa_pair_id',
|
|
38
|
-
'domain_id': 'domain_id',
|
|
39
|
-
'top_score_question': 'top_score_question',
|
|
40
|
-
'relevance_details': 'relevance_details'
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
def __init__(self, question=None, answer=None, score=None, domain=None, link=None, qa_pair_id=None, domain_id=None, top_score_question=None, relevance_details=None):
|
|
44
|
-
r"""QabotAnswer
|
|
45
|
-
|
|
46
|
-
The model defined in huaweicloud sdk
|
|
47
|
-
|
|
48
|
-
:param question: 问题
|
|
49
|
-
:type question: str
|
|
50
|
-
:param answer: 答案
|
|
51
|
-
:type answer: str
|
|
52
|
-
:param score: 评分
|
|
53
|
-
:type score: float
|
|
54
|
-
:param domain: 主题
|
|
55
|
-
:type domain: str
|
|
56
|
-
:param link: 链接地址
|
|
57
|
-
:type link: str
|
|
58
|
-
:param qa_pair_id: 语料id
|
|
59
|
-
:type qa_pair_id: str
|
|
60
|
-
:param domain_id: 主题id
|
|
61
|
-
:type domain_id: str
|
|
62
|
-
:param top_score_question: 推荐答案
|
|
63
|
-
:type top_score_question: str
|
|
64
|
-
:param relevance_details: 相关问题列表
|
|
65
|
-
:type relevance_details: list[:class:`huaweicloudsdkosm.v2.RelevanceQapair`]
|
|
66
|
-
"""
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
self._question = None
|
|
71
|
-
self._answer = None
|
|
72
|
-
self._score = None
|
|
73
|
-
self._domain = None
|
|
74
|
-
self._link = None
|
|
75
|
-
self._qa_pair_id = None
|
|
76
|
-
self._domain_id = None
|
|
77
|
-
self._top_score_question = None
|
|
78
|
-
self._relevance_details = None
|
|
79
|
-
self.discriminator = None
|
|
80
|
-
|
|
81
|
-
if question is not None:
|
|
82
|
-
self.question = question
|
|
83
|
-
if answer is not None:
|
|
84
|
-
self.answer = answer
|
|
85
|
-
if score is not None:
|
|
86
|
-
self.score = score
|
|
87
|
-
if domain is not None:
|
|
88
|
-
self.domain = domain
|
|
89
|
-
if link is not None:
|
|
90
|
-
self.link = link
|
|
91
|
-
if qa_pair_id is not None:
|
|
92
|
-
self.qa_pair_id = qa_pair_id
|
|
93
|
-
if domain_id is not None:
|
|
94
|
-
self.domain_id = domain_id
|
|
95
|
-
if top_score_question is not None:
|
|
96
|
-
self.top_score_question = top_score_question
|
|
97
|
-
if relevance_details is not None:
|
|
98
|
-
self.relevance_details = relevance_details
|
|
99
|
-
|
|
100
|
-
@property
|
|
101
|
-
def question(self):
|
|
102
|
-
r"""Gets the question of this QabotAnswer.
|
|
103
|
-
|
|
104
|
-
问题
|
|
105
|
-
|
|
106
|
-
:return: The question of this QabotAnswer.
|
|
107
|
-
:rtype: str
|
|
108
|
-
"""
|
|
109
|
-
return self._question
|
|
110
|
-
|
|
111
|
-
@question.setter
|
|
112
|
-
def question(self, question):
|
|
113
|
-
r"""Sets the question of this QabotAnswer.
|
|
114
|
-
|
|
115
|
-
问题
|
|
116
|
-
|
|
117
|
-
:param question: The question of this QabotAnswer.
|
|
118
|
-
:type question: str
|
|
119
|
-
"""
|
|
120
|
-
self._question = question
|
|
121
|
-
|
|
122
|
-
@property
|
|
123
|
-
def answer(self):
|
|
124
|
-
r"""Gets the answer of this QabotAnswer.
|
|
125
|
-
|
|
126
|
-
答案
|
|
127
|
-
|
|
128
|
-
:return: The answer of this QabotAnswer.
|
|
129
|
-
:rtype: str
|
|
130
|
-
"""
|
|
131
|
-
return self._answer
|
|
132
|
-
|
|
133
|
-
@answer.setter
|
|
134
|
-
def answer(self, answer):
|
|
135
|
-
r"""Sets the answer of this QabotAnswer.
|
|
136
|
-
|
|
137
|
-
答案
|
|
138
|
-
|
|
139
|
-
:param answer: The answer of this QabotAnswer.
|
|
140
|
-
:type answer: str
|
|
141
|
-
"""
|
|
142
|
-
self._answer = answer
|
|
143
|
-
|
|
144
|
-
@property
|
|
145
|
-
def score(self):
|
|
146
|
-
r"""Gets the score of this QabotAnswer.
|
|
147
|
-
|
|
148
|
-
评分
|
|
149
|
-
|
|
150
|
-
:return: The score of this QabotAnswer.
|
|
151
|
-
:rtype: float
|
|
152
|
-
"""
|
|
153
|
-
return self._score
|
|
154
|
-
|
|
155
|
-
@score.setter
|
|
156
|
-
def score(self, score):
|
|
157
|
-
r"""Sets the score of this QabotAnswer.
|
|
158
|
-
|
|
159
|
-
评分
|
|
160
|
-
|
|
161
|
-
:param score: The score of this QabotAnswer.
|
|
162
|
-
:type score: float
|
|
163
|
-
"""
|
|
164
|
-
self._score = score
|
|
165
|
-
|
|
166
|
-
@property
|
|
167
|
-
def domain(self):
|
|
168
|
-
r"""Gets the domain of this QabotAnswer.
|
|
169
|
-
|
|
170
|
-
主题
|
|
171
|
-
|
|
172
|
-
:return: The domain of this QabotAnswer.
|
|
173
|
-
:rtype: str
|
|
174
|
-
"""
|
|
175
|
-
return self._domain
|
|
176
|
-
|
|
177
|
-
@domain.setter
|
|
178
|
-
def domain(self, domain):
|
|
179
|
-
r"""Sets the domain of this QabotAnswer.
|
|
180
|
-
|
|
181
|
-
主题
|
|
182
|
-
|
|
183
|
-
:param domain: The domain of this QabotAnswer.
|
|
184
|
-
:type domain: str
|
|
185
|
-
"""
|
|
186
|
-
self._domain = domain
|
|
187
|
-
|
|
188
|
-
@property
|
|
189
|
-
def link(self):
|
|
190
|
-
r"""Gets the link of this QabotAnswer.
|
|
191
|
-
|
|
192
|
-
链接地址
|
|
193
|
-
|
|
194
|
-
:return: The link of this QabotAnswer.
|
|
195
|
-
:rtype: str
|
|
196
|
-
"""
|
|
197
|
-
return self._link
|
|
198
|
-
|
|
199
|
-
@link.setter
|
|
200
|
-
def link(self, link):
|
|
201
|
-
r"""Sets the link of this QabotAnswer.
|
|
202
|
-
|
|
203
|
-
链接地址
|
|
204
|
-
|
|
205
|
-
:param link: The link of this QabotAnswer.
|
|
206
|
-
:type link: str
|
|
207
|
-
"""
|
|
208
|
-
self._link = link
|
|
209
|
-
|
|
210
|
-
@property
|
|
211
|
-
def qa_pair_id(self):
|
|
212
|
-
r"""Gets the qa_pair_id of this QabotAnswer.
|
|
213
|
-
|
|
214
|
-
语料id
|
|
215
|
-
|
|
216
|
-
:return: The qa_pair_id of this QabotAnswer.
|
|
217
|
-
:rtype: str
|
|
218
|
-
"""
|
|
219
|
-
return self._qa_pair_id
|
|
220
|
-
|
|
221
|
-
@qa_pair_id.setter
|
|
222
|
-
def qa_pair_id(self, qa_pair_id):
|
|
223
|
-
r"""Sets the qa_pair_id of this QabotAnswer.
|
|
224
|
-
|
|
225
|
-
语料id
|
|
226
|
-
|
|
227
|
-
:param qa_pair_id: The qa_pair_id of this QabotAnswer.
|
|
228
|
-
:type qa_pair_id: str
|
|
229
|
-
"""
|
|
230
|
-
self._qa_pair_id = qa_pair_id
|
|
231
|
-
|
|
232
|
-
@property
|
|
233
|
-
def domain_id(self):
|
|
234
|
-
r"""Gets the domain_id of this QabotAnswer.
|
|
235
|
-
|
|
236
|
-
主题id
|
|
237
|
-
|
|
238
|
-
:return: The domain_id of this QabotAnswer.
|
|
239
|
-
:rtype: str
|
|
240
|
-
"""
|
|
241
|
-
return self._domain_id
|
|
242
|
-
|
|
243
|
-
@domain_id.setter
|
|
244
|
-
def domain_id(self, domain_id):
|
|
245
|
-
r"""Sets the domain_id of this QabotAnswer.
|
|
246
|
-
|
|
247
|
-
主题id
|
|
248
|
-
|
|
249
|
-
:param domain_id: The domain_id of this QabotAnswer.
|
|
250
|
-
:type domain_id: str
|
|
251
|
-
"""
|
|
252
|
-
self._domain_id = domain_id
|
|
253
|
-
|
|
254
|
-
@property
|
|
255
|
-
def top_score_question(self):
|
|
256
|
-
r"""Gets the top_score_question of this QabotAnswer.
|
|
257
|
-
|
|
258
|
-
推荐答案
|
|
259
|
-
|
|
260
|
-
:return: The top_score_question of this QabotAnswer.
|
|
261
|
-
:rtype: str
|
|
262
|
-
"""
|
|
263
|
-
return self._top_score_question
|
|
264
|
-
|
|
265
|
-
@top_score_question.setter
|
|
266
|
-
def top_score_question(self, top_score_question):
|
|
267
|
-
r"""Sets the top_score_question of this QabotAnswer.
|
|
268
|
-
|
|
269
|
-
推荐答案
|
|
270
|
-
|
|
271
|
-
:param top_score_question: The top_score_question of this QabotAnswer.
|
|
272
|
-
:type top_score_question: str
|
|
273
|
-
"""
|
|
274
|
-
self._top_score_question = top_score_question
|
|
275
|
-
|
|
276
|
-
@property
|
|
277
|
-
def relevance_details(self):
|
|
278
|
-
r"""Gets the relevance_details of this QabotAnswer.
|
|
279
|
-
|
|
280
|
-
相关问题列表
|
|
281
|
-
|
|
282
|
-
:return: The relevance_details of this QabotAnswer.
|
|
283
|
-
:rtype: list[:class:`huaweicloudsdkosm.v2.RelevanceQapair`]
|
|
284
|
-
"""
|
|
285
|
-
return self._relevance_details
|
|
286
|
-
|
|
287
|
-
@relevance_details.setter
|
|
288
|
-
def relevance_details(self, relevance_details):
|
|
289
|
-
r"""Sets the relevance_details of this QabotAnswer.
|
|
290
|
-
|
|
291
|
-
相关问题列表
|
|
292
|
-
|
|
293
|
-
:param relevance_details: The relevance_details of this QabotAnswer.
|
|
294
|
-
:type relevance_details: list[:class:`huaweicloudsdkosm.v2.RelevanceQapair`]
|
|
295
|
-
"""
|
|
296
|
-
self._relevance_details = relevance_details
|
|
297
|
-
|
|
298
|
-
def to_dict(self):
|
|
299
|
-
"""Returns the model properties as a dict"""
|
|
300
|
-
result = {}
|
|
301
|
-
|
|
302
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
303
|
-
value = getattr(self, attr)
|
|
304
|
-
if isinstance(value, list):
|
|
305
|
-
result[attr] = list(map(
|
|
306
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
307
|
-
value
|
|
308
|
-
))
|
|
309
|
-
elif hasattr(value, "to_dict"):
|
|
310
|
-
result[attr] = value.to_dict()
|
|
311
|
-
elif isinstance(value, dict):
|
|
312
|
-
result[attr] = dict(map(
|
|
313
|
-
lambda item: (item[0], item[1].to_dict())
|
|
314
|
-
if hasattr(item[1], "to_dict") else item,
|
|
315
|
-
value.items()
|
|
316
|
-
))
|
|
317
|
-
else:
|
|
318
|
-
if attr in self.sensitive_list:
|
|
319
|
-
result[attr] = "****"
|
|
320
|
-
else:
|
|
321
|
-
result[attr] = value
|
|
322
|
-
|
|
323
|
-
return result
|
|
324
|
-
|
|
325
|
-
def to_str(self):
|
|
326
|
-
"""Returns the string representation of the model"""
|
|
327
|
-
import simplejson as json
|
|
328
|
-
if six.PY2:
|
|
329
|
-
import sys
|
|
330
|
-
reload(sys)
|
|
331
|
-
sys.setdefaultencoding("utf-8")
|
|
332
|
-
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
333
|
-
|
|
334
|
-
def __repr__(self):
|
|
335
|
-
"""For `print`"""
|
|
336
|
-
return self.to_str()
|
|
337
|
-
|
|
338
|
-
def __eq__(self, other):
|
|
339
|
-
"""Returns true if both objects are equal"""
|
|
340
|
-
if not isinstance(other, QabotAnswer):
|
|
341
|
-
return False
|
|
342
|
-
|
|
343
|
-
return self.__dict__ == other.__dict__
|
|
344
|
-
|
|
345
|
-
def __ne__(self, other):
|
|
346
|
-
"""Returns true if both objects are not equal"""
|
|
347
|
-
return not self == other
|