huaweicloudsdkdwr 3.1.181__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.
Files changed (174) hide show
  1. huaweicloudsdkdwr/__init__.py +0 -0
  2. huaweicloudsdkdwr/v1/__init__.py +97 -0
  3. huaweicloudsdkdwr/v1/dwr_async_client.py +1584 -0
  4. huaweicloudsdkdwr/v1/dwr_client.py +1581 -0
  5. huaweicloudsdkdwr/v1/model/__init__.py +94 -0
  6. huaweicloudsdkdwr/v1/model/build_progress.py +224 -0
  7. huaweicloudsdkdwr/v1/model/charge_info.py +223 -0
  8. huaweicloudsdkdwr/v1/model/collection_base_info.py +135 -0
  9. huaweicloudsdkdwr/v1/model/create_collection_body.py +274 -0
  10. huaweicloudsdkdwr/v1/model/create_collection_request.py +104 -0
  11. huaweicloudsdkdwr/v1/model/create_collection_response.py +141 -0
  12. huaweicloudsdkdwr/v1/model/create_index_body.py +159 -0
  13. huaweicloudsdkdwr/v1/model/create_index_request.py +104 -0
  14. huaweicloudsdkdwr/v1/model/create_index_response.py +141 -0
  15. huaweicloudsdkdwr/v1/model/create_store_body.py +241 -0
  16. huaweicloudsdkdwr/v1/model/create_store_data.py +328 -0
  17. huaweicloudsdkdwr/v1/model/create_store_request.py +104 -0
  18. huaweicloudsdkdwr/v1/model/create_store_response.py +166 -0
  19. huaweicloudsdkdwr/v1/model/decribe_collection_data.py +337 -0
  20. huaweicloudsdkdwr/v1/model/delete_collection_request.py +104 -0
  21. huaweicloudsdkdwr/v1/model/delete_collection_response.py +141 -0
  22. huaweicloudsdkdwr/v1/model/delete_entities_body.py +163 -0
  23. huaweicloudsdkdwr/v1/model/delete_entities_request.py +104 -0
  24. huaweicloudsdkdwr/v1/model/delete_entities_response.py +141 -0
  25. huaweicloudsdkdwr/v1/model/delete_index_body.py +163 -0
  26. huaweicloudsdkdwr/v1/model/delete_index_request.py +104 -0
  27. huaweicloudsdkdwr/v1/model/delete_index_response.py +141 -0
  28. huaweicloudsdkdwr/v1/model/delete_store_data.py +107 -0
  29. huaweicloudsdkdwr/v1/model/delete_store_request.py +104 -0
  30. huaweicloudsdkdwr/v1/model/delete_store_response.py +166 -0
  31. huaweicloudsdkdwr/v1/model/describe_collection_request.py +104 -0
  32. huaweicloudsdkdwr/v1/model/describe_collection_response.py +166 -0
  33. huaweicloudsdkdwr/v1/model/describe_index_body.py +163 -0
  34. huaweicloudsdkdwr/v1/model/describe_index_data.py +159 -0
  35. huaweicloudsdkdwr/v1/model/describe_index_request.py +104 -0
  36. huaweicloudsdkdwr/v1/model/describe_index_response.py +166 -0
  37. huaweicloudsdkdwr/v1/model/describe_job_body.py +107 -0
  38. huaweicloudsdkdwr/v1/model/describe_job_request.py +104 -0
  39. huaweicloudsdkdwr/v1/model/describe_job_response.py +166 -0
  40. huaweicloudsdkdwr/v1/model/describe_store_request.py +104 -0
  41. huaweicloudsdkdwr/v1/model/describe_store_response.py +166 -0
  42. huaweicloudsdkdwr/v1/model/entities_data.py +107 -0
  43. huaweicloudsdkdwr/v1/model/field.py +222 -0
  44. huaweicloudsdkdwr/v1/model/field_data.py +278 -0
  45. huaweicloudsdkdwr/v1/model/flavor.py +135 -0
  46. huaweicloudsdkdwr/v1/model/get_index_progress_body.py +163 -0
  47. huaweicloudsdkdwr/v1/model/get_progress_data.py +160 -0
  48. huaweicloudsdkdwr/v1/model/get_progress_request.py +104 -0
  49. huaweicloudsdkdwr/v1/model/get_progress_response.py +166 -0
  50. huaweicloudsdkdwr/v1/model/hybrid_search_body.py +275 -0
  51. huaweicloudsdkdwr/v1/model/hybrid_search_request.py +104 -0
  52. huaweicloudsdkdwr/v1/model/hybrid_search_response.py +166 -0
  53. huaweicloudsdkdwr/v1/model/index_desc.py +191 -0
  54. huaweicloudsdkdwr/v1/model/index_params.py +164 -0
  55. huaweicloudsdkdwr/v1/model/insert_entities_body.py +163 -0
  56. huaweicloudsdkdwr/v1/model/insert_entities_data.py +136 -0
  57. huaweicloudsdkdwr/v1/model/insert_entities_request.py +104 -0
  58. huaweicloudsdkdwr/v1/model/insert_entities_response.py +166 -0
  59. huaweicloudsdkdwr/v1/model/job_data.py +309 -0
  60. huaweicloudsdkdwr/v1/model/list_collection_data.py +136 -0
  61. huaweicloudsdkdwr/v1/model/list_collection_details.py +253 -0
  62. huaweicloudsdkdwr/v1/model/list_collections_body.py +136 -0
  63. huaweicloudsdkdwr/v1/model/list_collections_request.py +104 -0
  64. huaweicloudsdkdwr/v1/model/list_collections_response.py +166 -0
  65. huaweicloudsdkdwr/v1/model/list_jobs_data.py +108 -0
  66. huaweicloudsdkdwr/v1/model/list_jobs_request.py +224 -0
  67. huaweicloudsdkdwr/v1/model/list_jobs_response.py +166 -0
  68. huaweicloudsdkdwr/v1/model/list_store_data.py +107 -0
  69. huaweicloudsdkdwr/v1/model/list_stores_request.py +77 -0
  70. huaweicloudsdkdwr/v1/model/list_stores_response.py +166 -0
  71. huaweicloudsdkdwr/v1/model/load_collection_body.py +135 -0
  72. huaweicloudsdkdwr/v1/model/load_collection_request.py +104 -0
  73. huaweicloudsdkdwr/v1/model/load_collection_response.py +141 -0
  74. huaweicloudsdkdwr/v1/model/primary_field.py +135 -0
  75. huaweicloudsdkdwr/v1/model/query_entities_body.py +250 -0
  76. huaweicloudsdkdwr/v1/model/query_entities_request.py +104 -0
  77. huaweicloudsdkdwr/v1/model/query_entities_response.py +166 -0
  78. huaweicloudsdkdwr/v1/model/release_collection_request.py +104 -0
  79. huaweicloudsdkdwr/v1/model/release_collection_response.py +141 -0
  80. huaweicloudsdkdwr/v1/model/rerank.py +136 -0
  81. huaweicloudsdkdwr/v1/model/scale_store_body.py +135 -0
  82. huaweicloudsdkdwr/v1/model/scale_store_data.py +220 -0
  83. huaweicloudsdkdwr/v1/model/scale_store_request.py +104 -0
  84. huaweicloudsdkdwr/v1/model/scale_store_response.py +166 -0
  85. huaweicloudsdkdwr/v1/model/search_entities_body.py +336 -0
  86. huaweicloudsdkdwr/v1/model/search_entities_request.py +104 -0
  87. huaweicloudsdkdwr/v1/model/search_entities_response.py +166 -0
  88. huaweicloudsdkdwr/v1/model/store_data.py +357 -0
  89. huaweicloudsdkdwr/v1/model/store_info.py +107 -0
  90. huaweicloudsdkdwr/v1/model/sub_search.py +251 -0
  91. huaweicloudsdkdwr/v1/model/upsert_entities_body.py +163 -0
  92. huaweicloudsdkdwr/v1/model/upsert_entities_data.py +135 -0
  93. huaweicloudsdkdwr/v1/model/upsert_entities_request.py +104 -0
  94. huaweicloudsdkdwr/v1/model/upsert_entities_response.py +166 -0
  95. huaweicloudsdkdwr/v1/region/__init__.py +0 -0
  96. huaweicloudsdkdwr/v1/region/dwr_region.py +43 -0
  97. huaweicloudsdkdwr/v3/__init__.py +76 -0
  98. huaweicloudsdkdwr/v3/dwr_async_client.py +1622 -0
  99. huaweicloudsdkdwr/v3/dwr_client.py +1619 -0
  100. huaweicloudsdkdwr/v3/model/__init__.py +73 -0
  101. huaweicloudsdkdwr/v3/model/accept_service_contract_request.py +107 -0
  102. huaweicloudsdkdwr/v3/model/accept_service_contract_response.py +133 -0
  103. huaweicloudsdkdwr/v3/model/action.py +420 -0
  104. huaweicloudsdkdwr/v3/model/action_result.py +221 -0
  105. huaweicloudsdkdwr/v3/model/action_template_item.py +137 -0
  106. huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_request.py +132 -0
  107. huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_response.py +270 -0
  108. huaweicloudsdkdwr/v3/model/check_workflow_authentication_request.py +77 -0
  109. huaweicloudsdkdwr/v3/model/check_workflow_authentication_response.py +473 -0
  110. huaweicloudsdkdwr/v3/model/create_my_action_template_request.py +132 -0
  111. huaweicloudsdkdwr/v3/model/create_my_action_template_response.py +415 -0
  112. huaweicloudsdkdwr/v3/model/create_workflow_authentication_request.py +77 -0
  113. huaweicloudsdkdwr/v3/model/create_workflow_authentication_response.py +133 -0
  114. huaweicloudsdkdwr/v3/model/create_workflow_request.py +132 -0
  115. huaweicloudsdkdwr/v3/model/create_workflow_request_body.py +274 -0
  116. huaweicloudsdkdwr/v3/model/create_workflow_response.py +270 -0
  117. huaweicloudsdkdwr/v3/model/delete_my_action_template_request.py +107 -0
  118. huaweicloudsdkdwr/v3/model/delete_my_action_template_response.py +133 -0
  119. huaweicloudsdkdwr/v3/model/delete_workflow_request.py +107 -0
  120. huaweicloudsdkdwr/v3/model/delete_workflow_response.py +133 -0
  121. huaweicloudsdkdwr/v3/model/execute_workflow_body.py +160 -0
  122. huaweicloudsdkdwr/v3/model/execution.py +282 -0
  123. huaweicloudsdkdwr/v3/model/express_config.py +137 -0
  124. huaweicloudsdkdwr/v3/model/func_vpc.py +253 -0
  125. huaweicloudsdkdwr/v3/model/graph_item.py +195 -0
  126. huaweicloudsdkdwr/v3/model/input.py +367 -0
  127. huaweicloudsdkdwr/v3/model/input_para_type.py +77 -0
  128. huaweicloudsdkdwr/v3/model/input_para_value_type.py +77 -0
  129. huaweicloudsdkdwr/v3/model/list_my_action_template_request.py +224 -0
  130. huaweicloudsdkdwr/v3/model/list_my_action_template_response.py +299 -0
  131. huaweicloudsdkdwr/v3/model/list_system_templates_request.py +195 -0
  132. huaweicloudsdkdwr/v3/model/list_system_templates_response.py +328 -0
  133. huaweicloudsdkdwr/v3/model/list_workflow_instance_request.py +252 -0
  134. huaweicloudsdkdwr/v3/model/list_workflow_instance_response.py +299 -0
  135. huaweicloudsdkdwr/v3/model/list_workflows_request.py +166 -0
  136. huaweicloudsdkdwr/v3/model/list_workflows_response.py +299 -0
  137. huaweicloudsdkdwr/v3/model/node_execution.py +282 -0
  138. huaweicloudsdkdwr/v3/model/policy.py +137 -0
  139. huaweicloudsdkdwr/v3/model/provided_action.py +561 -0
  140. huaweicloudsdkdwr/v3/model/public_template_item.py +282 -0
  141. huaweicloudsdkdwr/v3/model/public_template_register_type.py +77 -0
  142. huaweicloudsdkdwr/v3/model/restore_workflow_execution_request.py +135 -0
  143. huaweicloudsdkdwr/v3/model/restore_workflow_execution_response.py +270 -0
  144. huaweicloudsdkdwr/v3/model/show_public_action_list_request.py +195 -0
  145. huaweicloudsdkdwr/v3/model/show_public_action_list_response.py +328 -0
  146. huaweicloudsdkdwr/v3/model/show_public_template_info_request.py +107 -0
  147. huaweicloudsdkdwr/v3/model/show_public_template_info_response.py +208 -0
  148. huaweicloudsdkdwr/v3/model/show_service_contract_request.py +107 -0
  149. huaweicloudsdkdwr/v3/model/show_service_contract_response.py +241 -0
  150. huaweicloudsdkdwr/v3/model/show_system_template_detail_request.py +107 -0
  151. huaweicloudsdkdwr/v3/model/show_system_template_detail_response.py +208 -0
  152. huaweicloudsdkdwr/v3/model/show_third_template_info_request.py +107 -0
  153. huaweicloudsdkdwr/v3/model/show_third_template_info_response.py +208 -0
  154. huaweicloudsdkdwr/v3/model/show_workflow_info_request.py +107 -0
  155. huaweicloudsdkdwr/v3/model/show_workflow_info_response.py +328 -0
  156. huaweicloudsdkdwr/v3/model/show_workflow_instance_request.py +135 -0
  157. huaweicloudsdkdwr/v3/model/show_workflow_instance_response.py +531 -0
  158. huaweicloudsdkdwr/v3/model/state.py +338 -0
  159. huaweicloudsdkdwr/v3/model/statement.py +137 -0
  160. huaweicloudsdkdwr/v3/model/third_action_template_item.py +282 -0
  161. huaweicloudsdkdwr/v3/model/third_template_request_body.py +423 -0
  162. huaweicloudsdkdwr/v3/model/update_my_action_template_request.py +132 -0
  163. huaweicloudsdkdwr/v3/model/update_my_action_template_response.py +270 -0
  164. huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_request.py +107 -0
  165. huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_response.py +133 -0
  166. huaweicloudsdkdwr/v3/model/update_workflow_body.py +108 -0
  167. huaweicloudsdkdwr/v3/model/update_workflow_request.py +132 -0
  168. huaweicloudsdkdwr/v3/model/update_workflow_response.py +270 -0
  169. huaweicloudsdkdwr/v3/region/__init__.py +0 -0
  170. huaweicloudsdkdwr/v3/region/dwr_region.py +43 -0
  171. huaweicloudsdkdwr-3.1.181.dist-info/METADATA +25 -0
  172. huaweicloudsdkdwr-3.1.181.dist-info/RECORD +174 -0
  173. huaweicloudsdkdwr-3.1.181.dist-info/WHEEL +4 -0
  174. huaweicloudsdkdwr-3.1.181.dist-info/licenses/LICENSE +13 -0
@@ -0,0 +1,251 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class SubSearch:
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
+ 'vector_field': 'str',
19
+ 'vector': 'list[object]',
20
+ 'top_k': 'int',
21
+ 'offset': 'int',
22
+ 'filter': 'str',
23
+ 'params': 'dict(str, object)'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'vector_field': 'vector_field',
28
+ 'vector': 'vector',
29
+ 'top_k': 'top_k',
30
+ 'offset': 'offset',
31
+ 'filter': 'filter',
32
+ 'params': 'params'
33
+ }
34
+
35
+ def __init__(self, vector_field=None, vector=None, top_k=None, offset=None, filter=None, params=None):
36
+ r"""SubSearch
37
+
38
+ The model defined in huaweicloud sdk
39
+
40
+ :param vector_field: **参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
41
+ :type vector_field: str
42
+ :param vector: **参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
43
+ :type vector: list[object]
44
+ :param top_k: **参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
45
+ :type top_k: int
46
+ :param offset: **参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
47
+ :type offset: int
48
+ :param filter: **参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不进行标量过滤。
49
+ :type filter: str
50
+ :param params: **参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
51
+ :type params: dict(str, object)
52
+ """
53
+
54
+
55
+
56
+ self._vector_field = None
57
+ self._vector = None
58
+ self._top_k = None
59
+ self._offset = None
60
+ self._filter = None
61
+ self._params = None
62
+ self.discriminator = None
63
+
64
+ self.vector_field = vector_field
65
+ self.vector = vector
66
+ if top_k is not None:
67
+ self.top_k = top_k
68
+ if offset is not None:
69
+ self.offset = offset
70
+ if filter is not None:
71
+ self.filter = filter
72
+ if params is not None:
73
+ self.params = params
74
+
75
+ @property
76
+ def vector_field(self):
77
+ r"""Gets the vector_field of this SubSearch.
78
+
79
+ **参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
80
+
81
+ :return: The vector_field of this SubSearch.
82
+ :rtype: str
83
+ """
84
+ return self._vector_field
85
+
86
+ @vector_field.setter
87
+ def vector_field(self, vector_field):
88
+ r"""Sets the vector_field of this SubSearch.
89
+
90
+ **参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
91
+
92
+ :param vector_field: The vector_field of this SubSearch.
93
+ :type vector_field: str
94
+ """
95
+ self._vector_field = vector_field
96
+
97
+ @property
98
+ def vector(self):
99
+ r"""Gets the vector of this SubSearch.
100
+
101
+ **参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
102
+
103
+ :return: The vector of this SubSearch.
104
+ :rtype: list[object]
105
+ """
106
+ return self._vector
107
+
108
+ @vector.setter
109
+ def vector(self, vector):
110
+ r"""Sets the vector of this SubSearch.
111
+
112
+ **参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
113
+
114
+ :param vector: The vector of this SubSearch.
115
+ :type vector: list[object]
116
+ """
117
+ self._vector = vector
118
+
119
+ @property
120
+ def top_k(self):
121
+ r"""Gets the top_k of this SubSearch.
122
+
123
+ **参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
124
+
125
+ :return: The top_k of this SubSearch.
126
+ :rtype: int
127
+ """
128
+ return self._top_k
129
+
130
+ @top_k.setter
131
+ def top_k(self, top_k):
132
+ r"""Sets the top_k of this SubSearch.
133
+
134
+ **参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
135
+
136
+ :param top_k: The top_k of this SubSearch.
137
+ :type top_k: int
138
+ """
139
+ self._top_k = top_k
140
+
141
+ @property
142
+ def offset(self):
143
+ r"""Gets the offset of this SubSearch.
144
+
145
+ **参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
146
+
147
+ :return: The offset of this SubSearch.
148
+ :rtype: int
149
+ """
150
+ return self._offset
151
+
152
+ @offset.setter
153
+ def offset(self, offset):
154
+ r"""Sets the offset of this SubSearch.
155
+
156
+ **参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
157
+
158
+ :param offset: The offset of this SubSearch.
159
+ :type offset: int
160
+ """
161
+ self._offset = offset
162
+
163
+ @property
164
+ def filter(self):
165
+ r"""Gets the filter of this SubSearch.
166
+
167
+ **参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不进行标量过滤。
168
+
169
+ :return: The filter of this SubSearch.
170
+ :rtype: str
171
+ """
172
+ return self._filter
173
+
174
+ @filter.setter
175
+ def filter(self, filter):
176
+ r"""Sets the filter of this SubSearch.
177
+
178
+ **参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不进行标量过滤。
179
+
180
+ :param filter: The filter of this SubSearch.
181
+ :type filter: str
182
+ """
183
+ self._filter = filter
184
+
185
+ @property
186
+ def params(self):
187
+ r"""Gets the params of this SubSearch.
188
+
189
+ **参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
190
+
191
+ :return: The params of this SubSearch.
192
+ :rtype: dict(str, object)
193
+ """
194
+ return self._params
195
+
196
+ @params.setter
197
+ def params(self, params):
198
+ r"""Sets the params of this SubSearch.
199
+
200
+ **参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
201
+
202
+ :param params: The params of this SubSearch.
203
+ :type params: dict(str, object)
204
+ """
205
+ self._params = params
206
+
207
+ def to_dict(self):
208
+ result = {}
209
+
210
+ for attr, _ in self.openapi_types.items():
211
+ value = getattr(self, attr)
212
+ if isinstance(value, list):
213
+ result[attr] = list(map(
214
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
215
+ value
216
+ ))
217
+ elif hasattr(value, "to_dict"):
218
+ result[attr] = value.to_dict()
219
+ elif isinstance(value, dict):
220
+ result[attr] = dict(map(
221
+ lambda item: (item[0], item[1].to_dict())
222
+ if hasattr(item[1], "to_dict") else item,
223
+ value.items()
224
+ ))
225
+ else:
226
+ if attr in self.sensitive_list:
227
+ result[attr] = "****"
228
+ else:
229
+ result[attr] = value
230
+
231
+ return result
232
+
233
+ def to_str(self):
234
+ """Returns the string representation of the model"""
235
+ import simplejson as json
236
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
237
+
238
+ def __repr__(self):
239
+ """For `print`"""
240
+ return self.to_str()
241
+
242
+ def __eq__(self, other):
243
+ """Returns true if both objects are equal"""
244
+ if not isinstance(other, SubSearch):
245
+ return False
246
+
247
+ return self.__dict__ == other.__dict__
248
+
249
+ def __ne__(self, other):
250
+ """Returns true if both objects are not equal"""
251
+ return not self == other
@@ -0,0 +1,163 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class UpsertEntitiesBody:
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
+ 'store_name': 'str',
19
+ 'collection_name': 'str',
20
+ 'data': 'list[dict(str, object)]'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'store_name': 'store_name',
25
+ 'collection_name': 'collection_name',
26
+ 'data': 'data'
27
+ }
28
+
29
+ def __init__(self, store_name=None, collection_name=None, data=None):
30
+ r"""UpsertEntitiesBody
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param store_name: **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
35
+ :type store_name: str
36
+ :param collection_name: **参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
37
+ :type collection_name: str
38
+ :param data: **参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
39
+ :type data: list[dict(str, object)]
40
+ """
41
+
42
+
43
+
44
+ self._store_name = None
45
+ self._collection_name = None
46
+ self._data = None
47
+ self.discriminator = None
48
+
49
+ self.store_name = store_name
50
+ self.collection_name = collection_name
51
+ self.data = data
52
+
53
+ @property
54
+ def store_name(self):
55
+ r"""Gets the store_name of this UpsertEntitiesBody.
56
+
57
+ **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
58
+
59
+ :return: The store_name of this UpsertEntitiesBody.
60
+ :rtype: str
61
+ """
62
+ return self._store_name
63
+
64
+ @store_name.setter
65
+ def store_name(self, store_name):
66
+ r"""Sets the store_name of this UpsertEntitiesBody.
67
+
68
+ **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
69
+
70
+ :param store_name: The store_name of this UpsertEntitiesBody.
71
+ :type store_name: str
72
+ """
73
+ self._store_name = store_name
74
+
75
+ @property
76
+ def collection_name(self):
77
+ r"""Gets the collection_name of this UpsertEntitiesBody.
78
+
79
+ **参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
80
+
81
+ :return: The collection_name of this UpsertEntitiesBody.
82
+ :rtype: str
83
+ """
84
+ return self._collection_name
85
+
86
+ @collection_name.setter
87
+ def collection_name(self, collection_name):
88
+ r"""Sets the collection_name of this UpsertEntitiesBody.
89
+
90
+ **参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
91
+
92
+ :param collection_name: The collection_name of this UpsertEntitiesBody.
93
+ :type collection_name: str
94
+ """
95
+ self._collection_name = collection_name
96
+
97
+ @property
98
+ def data(self):
99
+ r"""Gets the data of this UpsertEntitiesBody.
100
+
101
+ **参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
102
+
103
+ :return: The data of this UpsertEntitiesBody.
104
+ :rtype: list[dict(str, object)]
105
+ """
106
+ return self._data
107
+
108
+ @data.setter
109
+ def data(self, data):
110
+ r"""Sets the data of this UpsertEntitiesBody.
111
+
112
+ **参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
113
+
114
+ :param data: The data of this UpsertEntitiesBody.
115
+ :type data: list[dict(str, object)]
116
+ """
117
+ self._data = data
118
+
119
+ def to_dict(self):
120
+ result = {}
121
+
122
+ for attr, _ in self.openapi_types.items():
123
+ value = getattr(self, attr)
124
+ if isinstance(value, list):
125
+ result[attr] = list(map(
126
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
127
+ value
128
+ ))
129
+ elif hasattr(value, "to_dict"):
130
+ result[attr] = value.to_dict()
131
+ elif isinstance(value, dict):
132
+ result[attr] = dict(map(
133
+ lambda item: (item[0], item[1].to_dict())
134
+ if hasattr(item[1], "to_dict") else item,
135
+ value.items()
136
+ ))
137
+ else:
138
+ if attr in self.sensitive_list:
139
+ result[attr] = "****"
140
+ else:
141
+ result[attr] = value
142
+
143
+ return result
144
+
145
+ def to_str(self):
146
+ """Returns the string representation of the model"""
147
+ import simplejson as json
148
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
149
+
150
+ def __repr__(self):
151
+ """For `print`"""
152
+ return self.to_str()
153
+
154
+ def __eq__(self, other):
155
+ """Returns true if both objects are equal"""
156
+ if not isinstance(other, UpsertEntitiesBody):
157
+ return False
158
+
159
+ return self.__dict__ == other.__dict__
160
+
161
+ def __ne__(self, other):
162
+ """Returns true if both objects are not equal"""
163
+ return not self == other
@@ -0,0 +1,135 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class UpsertEntitiesData:
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
+ 'upsert_count': 'int',
19
+ 'upsert_ids': 'list[object]'
20
+ }
21
+
22
+ attribute_map = {
23
+ 'upsert_count': 'upsert_count',
24
+ 'upsert_ids': 'upsert_ids'
25
+ }
26
+
27
+ def __init__(self, upsert_count=None, upsert_ids=None):
28
+ r"""UpsertEntitiesData
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param upsert_count: **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
33
+ :type upsert_count: int
34
+ :param upsert_ids: **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
35
+ :type upsert_ids: list[object]
36
+ """
37
+
38
+
39
+
40
+ self._upsert_count = None
41
+ self._upsert_ids = None
42
+ self.discriminator = None
43
+
44
+ self.upsert_count = upsert_count
45
+ self.upsert_ids = upsert_ids
46
+
47
+ @property
48
+ def upsert_count(self):
49
+ r"""Gets the upsert_count of this UpsertEntitiesData.
50
+
51
+ **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
52
+
53
+ :return: The upsert_count of this UpsertEntitiesData.
54
+ :rtype: int
55
+ """
56
+ return self._upsert_count
57
+
58
+ @upsert_count.setter
59
+ def upsert_count(self, upsert_count):
60
+ r"""Sets the upsert_count of this UpsertEntitiesData.
61
+
62
+ **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
63
+
64
+ :param upsert_count: The upsert_count of this UpsertEntitiesData.
65
+ :type upsert_count: int
66
+ """
67
+ self._upsert_count = upsert_count
68
+
69
+ @property
70
+ def upsert_ids(self):
71
+ r"""Gets the upsert_ids of this UpsertEntitiesData.
72
+
73
+ **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
74
+
75
+ :return: The upsert_ids of this UpsertEntitiesData.
76
+ :rtype: list[object]
77
+ """
78
+ return self._upsert_ids
79
+
80
+ @upsert_ids.setter
81
+ def upsert_ids(self, upsert_ids):
82
+ r"""Sets the upsert_ids of this UpsertEntitiesData.
83
+
84
+ **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
85
+
86
+ :param upsert_ids: The upsert_ids of this UpsertEntitiesData.
87
+ :type upsert_ids: list[object]
88
+ """
89
+ self._upsert_ids = upsert_ids
90
+
91
+ def to_dict(self):
92
+ result = {}
93
+
94
+ for attr, _ in self.openapi_types.items():
95
+ value = getattr(self, attr)
96
+ if isinstance(value, list):
97
+ result[attr] = list(map(
98
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
99
+ value
100
+ ))
101
+ elif hasattr(value, "to_dict"):
102
+ result[attr] = value.to_dict()
103
+ elif isinstance(value, dict):
104
+ result[attr] = dict(map(
105
+ lambda item: (item[0], item[1].to_dict())
106
+ if hasattr(item[1], "to_dict") else item,
107
+ value.items()
108
+ ))
109
+ else:
110
+ if attr in self.sensitive_list:
111
+ result[attr] = "****"
112
+ else:
113
+ result[attr] = value
114
+
115
+ return result
116
+
117
+ def to_str(self):
118
+ """Returns the string representation of the model"""
119
+ import simplejson as json
120
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
121
+
122
+ def __repr__(self):
123
+ """For `print`"""
124
+ return self.to_str()
125
+
126
+ def __eq__(self, other):
127
+ """Returns true if both objects are equal"""
128
+ if not isinstance(other, UpsertEntitiesData):
129
+ return False
130
+
131
+ return self.__dict__ == other.__dict__
132
+
133
+ def __ne__(self, other):
134
+ """Returns true if both objects are not equal"""
135
+ return not self == other
@@ -0,0 +1,104 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class UpsertEntitiesRequest:
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
+ 'body': 'UpsertEntitiesBody'
19
+ }
20
+
21
+ attribute_map = {
22
+ 'body': 'body'
23
+ }
24
+
25
+ def __init__(self, body=None):
26
+ r"""UpsertEntitiesRequest
27
+
28
+ The model defined in huaweicloud sdk
29
+
30
+ :param body: Body of the UpsertEntitiesRequest
31
+ :type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
32
+ """
33
+
34
+
35
+
36
+ self._body = None
37
+ self.discriminator = None
38
+
39
+ if body is not None:
40
+ self.body = body
41
+
42
+ @property
43
+ def body(self):
44
+ r"""Gets the body of this UpsertEntitiesRequest.
45
+
46
+ :return: The body of this UpsertEntitiesRequest.
47
+ :rtype: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
48
+ """
49
+ return self._body
50
+
51
+ @body.setter
52
+ def body(self, body):
53
+ r"""Sets the body of this UpsertEntitiesRequest.
54
+
55
+ :param body: The body of this UpsertEntitiesRequest.
56
+ :type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
57
+ """
58
+ self._body = body
59
+
60
+ def to_dict(self):
61
+ result = {}
62
+
63
+ for attr, _ in self.openapi_types.items():
64
+ value = getattr(self, attr)
65
+ if isinstance(value, list):
66
+ result[attr] = list(map(
67
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
68
+ value
69
+ ))
70
+ elif hasattr(value, "to_dict"):
71
+ result[attr] = value.to_dict()
72
+ elif isinstance(value, dict):
73
+ result[attr] = dict(map(
74
+ lambda item: (item[0], item[1].to_dict())
75
+ if hasattr(item[1], "to_dict") else item,
76
+ value.items()
77
+ ))
78
+ else:
79
+ if attr in self.sensitive_list:
80
+ result[attr] = "****"
81
+ else:
82
+ result[attr] = value
83
+
84
+ return result
85
+
86
+ def to_str(self):
87
+ """Returns the string representation of the model"""
88
+ import simplejson as json
89
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
90
+
91
+ def __repr__(self):
92
+ """For `print`"""
93
+ return self.to_str()
94
+
95
+ def __eq__(self, other):
96
+ """Returns true if both objects are equal"""
97
+ if not isinstance(other, UpsertEntitiesRequest):
98
+ return False
99
+
100
+ return self.__dict__ == other.__dict__
101
+
102
+ def __ne__(self, other):
103
+ """Returns true if both objects are not equal"""
104
+ return not self == other