pinecone.core.client.model.query_vector

Pinecone API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

The version of the OpenAPI document: version not set Contact: support@pinecone.io Generated by: https://openapi-generator.tech

  1"""
  2    Pinecone API
  3
  4    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501
  5
  6    The version of the OpenAPI document: version not set
  7    Contact: support@pinecone.io
  8    Generated by: https://openapi-generator.tech
  9"""
 10
 11
 12import re  # noqa: F401
 13import sys  # noqa: F401
 14
 15from pinecone.core.client.model_utils import (  # noqa: F401
 16    ApiTypeError,
 17    ModelComposed,
 18    ModelNormal,
 19    ModelSimple,
 20    cached_property,
 21    change_keys_js_to_python,
 22    convert_js_args_to_python_args,
 23    date,
 24    datetime,
 25    file_type,
 26    none_type,
 27    validate_get_composed_info,
 28)
 29from ..model_utils import OpenApiModel
 30from pinecone.core.client.exceptions import ApiAttributeError
 31
 32
 33def lazy_import():
 34    from pinecone.core.client.model.sparse_values import SparseValues
 35
 36    globals()["SparseValues"] = SparseValues
 37
 38
 39class QueryVector(ModelNormal):
 40    """NOTE: This class is auto generated by OpenAPI Generator.
 41    Ref: https://openapi-generator.tech
 42
 43    Do not edit the class manually.
 44
 45    Attributes:
 46      allowed_values (dict): The key is the tuple path to the attribute
 47          and the for var_name this is (var_name,). The value is a dict
 48          with a capitalized key describing the allowed value and an allowed
 49          value. These dicts store the allowed enum values.
 50      attribute_map (dict): The key is attribute name
 51          and the value is json key in definition.
 52      discriminator_value_class_map (dict): A dict to go from the discriminator
 53          variable value to the discriminator class name.
 54      validations (dict): The key is the tuple path to the attribute
 55          and the for var_name this is (var_name,). The value is a dict
 56          that stores validations for max_length, min_length, max_items,
 57          min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
 58          inclusive_minimum, and regex.
 59      additional_properties_type (tuple): A tuple of classes accepted
 60          as additional properties values.
 61    """
 62
 63    allowed_values = {}
 64
 65    validations = {
 66        ("values",): {},
 67        ("top_k",): {
 68            "inclusive_maximum": 10000,
 69            "inclusive_minimum": 1,
 70        },
 71    }
 72
 73    @cached_property
 74    def additional_properties_type():
 75        """
 76        This must be a method because a model may have properties that are
 77        of type self, this must run after the class is loaded
 78        """
 79        lazy_import()
 80        return (
 81            bool,
 82            date,
 83            datetime,
 84            dict,
 85            float,
 86            int,
 87            list,
 88            str,
 89            none_type,
 90        )  # noqa: E501
 91
 92    _nullable = False
 93
 94    @cached_property
 95    def openapi_types():
 96        """
 97        This must be a method because a model may have properties that are
 98        of type self, this must run after the class is loaded
 99
100        Returns
101            openapi_types (dict): The key is attribute name
102                and the value is attribute type.
103        """
104        lazy_import()
105        return {
106            "values": ([float],),  # noqa: E501
107            "sparse_values": (SparseValues,),  # noqa: E501
108            "top_k": (int,),  # noqa: E501
109            "namespace": (str,),  # noqa: E501
110            "filter": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),  # noqa: E501
111        }
112
113    @cached_property
114    def discriminator():
115        return None
116
117    attribute_map = {
118        "values": "values",  # noqa: E501
119        "sparse_values": "sparseValues",  # noqa: E501
120        "top_k": "topK",  # noqa: E501
121        "namespace": "namespace",  # noqa: E501
122        "filter": "filter",  # noqa: E501
123    }
124
125    read_only_vars = {}
126
127    _composed_schemas = {}
128
129    @classmethod
130    @convert_js_args_to_python_args
131    def _from_openapi_data(cls, values, *args, **kwargs):  # noqa: E501
132        """QueryVector - a model defined in OpenAPI
133
134        Args:
135            values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
136
137        Keyword Args:
138            _check_type (bool): if True, values for parameters in openapi_types
139                                will be type checked and a TypeError will be
140                                raised if the wrong type is input.
141                                Defaults to True
142            _path_to_item (tuple/list): This is a list of keys or values to
143                                drill down to the model in received_data
144                                when deserializing a response
145            _spec_property_naming (bool): True if the variable names in the input data
146                                are serialized names, as specified in the OpenAPI document.
147                                False if the variable names in the input data
148                                are pythonic names, e.g. snake case (default)
149            _configuration (Configuration): the instance to use when
150                                deserializing a file_type parameter.
151                                If passed, type conversion is attempted
152                                If omitted no type conversion is done.
153            _visited_composed_classes (tuple): This stores a tuple of
154                                classes that we have traveled through so that
155                                if we see that class again we will not use its
156                                discriminator again.
157                                When traveling through a discriminator, the
158                                composed schema that is
159                                is traveled through is added to this set.
160                                For example if Animal has a discriminator
161                                petType and we pass in "Dog", and the class Dog
162                                allOf includes Animal, we move through Animal
163                                once using the discriminator, and pick Dog.
164                                Then in Dog, we will make an instance of the
165                                Animal class but this time we won't travel
166                                through its discriminator because we passed in
167                                _visited_composed_classes = (Animal,)
168            sparse_values (SparseValues): The sparse data of the query vector [optional]  # noqa: E501
169            top_k (int): An override for the number of results to return for this query vector.. [optional]  # noqa: E501
170            namespace (str): An override the namespace to search.. [optional]  # noqa: E501
171            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional]  # noqa: E501
172        """
173
174        _check_type = kwargs.pop("_check_type", True)
175        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
176        _path_to_item = kwargs.pop("_path_to_item", ())
177        _configuration = kwargs.pop("_configuration", None)
178        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
179
180        self = super(OpenApiModel, cls).__new__(cls)
181
182        if args:
183            raise ApiTypeError(
184                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
185                % (
186                    args,
187                    self.__class__.__name__,
188                ),
189                path_to_item=_path_to_item,
190                valid_classes=(self.__class__,),
191            )
192
193        self._data_store = {}
194        self._check_type = _check_type
195        self._spec_property_naming = _spec_property_naming
196        self._path_to_item = _path_to_item
197        self._configuration = _configuration
198        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
199
200        self.values = values
201        for var_name, var_value in kwargs.items():
202            if (
203                var_name not in self.attribute_map
204                and self._configuration is not None
205                and self._configuration.discard_unknown_keys
206                and self.additional_properties_type is None
207            ):
208                # discard variable.
209                continue
210            setattr(self, var_name, var_value)
211        return self
212
213    required_properties = set(
214        [
215            "_data_store",
216            "_check_type",
217            "_spec_property_naming",
218            "_path_to_item",
219            "_configuration",
220            "_visited_composed_classes",
221        ]
222    )
223
224    @convert_js_args_to_python_args
225    def __init__(self, values, *args, **kwargs):  # noqa: E501
226        """QueryVector - a model defined in OpenAPI
227
228        Args:
229            values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
230
231        Keyword Args:
232            _check_type (bool): if True, values for parameters in openapi_types
233                                will be type checked and a TypeError will be
234                                raised if the wrong type is input.
235                                Defaults to True
236            _path_to_item (tuple/list): This is a list of keys or values to
237                                drill down to the model in received_data
238                                when deserializing a response
239            _spec_property_naming (bool): True if the variable names in the input data
240                                are serialized names, as specified in the OpenAPI document.
241                                False if the variable names in the input data
242                                are pythonic names, e.g. snake case (default)
243            _configuration (Configuration): the instance to use when
244                                deserializing a file_type parameter.
245                                If passed, type conversion is attempted
246                                If omitted no type conversion is done.
247            _visited_composed_classes (tuple): This stores a tuple of
248                                classes that we have traveled through so that
249                                if we see that class again we will not use its
250                                discriminator again.
251                                When traveling through a discriminator, the
252                                composed schema that is
253                                is traveled through is added to this set.
254                                For example if Animal has a discriminator
255                                petType and we pass in "Dog", and the class Dog
256                                allOf includes Animal, we move through Animal
257                                once using the discriminator, and pick Dog.
258                                Then in Dog, we will make an instance of the
259                                Animal class but this time we won't travel
260                                through its discriminator because we passed in
261                                _visited_composed_classes = (Animal,)
262            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
263            top_k (int): An override for the number of results to return for this query vector.. [optional]  # noqa: E501
264            namespace (str): An override the namespace to search.. [optional]  # noqa: E501
265            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional]  # noqa: E501
266        """
267
268        _check_type = kwargs.pop("_check_type", True)
269        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
270        _path_to_item = kwargs.pop("_path_to_item", ())
271        _configuration = kwargs.pop("_configuration", None)
272        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
273
274        if args:
275            raise ApiTypeError(
276                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
277                % (
278                    args,
279                    self.__class__.__name__,
280                ),
281                path_to_item=_path_to_item,
282                valid_classes=(self.__class__,),
283            )
284
285        self._data_store = {}
286        self._check_type = _check_type
287        self._spec_property_naming = _spec_property_naming
288        self._path_to_item = _path_to_item
289        self._configuration = _configuration
290        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
291
292        self.values = values
293        for var_name, var_value in kwargs.items():
294            if (
295                var_name not in self.attribute_map
296                and self._configuration is not None
297                and self._configuration.discard_unknown_keys
298                and self.additional_properties_type is None
299            ):
300                # discard variable.
301                continue
302            setattr(self, var_name, var_value)
303            if var_name in self.read_only_vars:
304                raise ApiAttributeError(
305                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
306                    f"class with read only attributes."
307                )
def lazy_import():
34def lazy_import():
35    from pinecone.core.client.model.sparse_values import SparseValues
36
37    globals()["SparseValues"] = SparseValues
class QueryVector(pinecone.core.client.model_utils.ModelNormal):
 40class QueryVector(ModelNormal):
 41    """NOTE: This class is auto generated by OpenAPI Generator.
 42    Ref: https://openapi-generator.tech
 43
 44    Do not edit the class manually.
 45
 46    Attributes:
 47      allowed_values (dict): The key is the tuple path to the attribute
 48          and the for var_name this is (var_name,). The value is a dict
 49          with a capitalized key describing the allowed value and an allowed
 50          value. These dicts store the allowed enum values.
 51      attribute_map (dict): The key is attribute name
 52          and the value is json key in definition.
 53      discriminator_value_class_map (dict): A dict to go from the discriminator
 54          variable value to the discriminator class name.
 55      validations (dict): The key is the tuple path to the attribute
 56          and the for var_name this is (var_name,). The value is a dict
 57          that stores validations for max_length, min_length, max_items,
 58          min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
 59          inclusive_minimum, and regex.
 60      additional_properties_type (tuple): A tuple of classes accepted
 61          as additional properties values.
 62    """
 63
 64    allowed_values = {}
 65
 66    validations = {
 67        ("values",): {},
 68        ("top_k",): {
 69            "inclusive_maximum": 10000,
 70            "inclusive_minimum": 1,
 71        },
 72    }
 73
 74    @cached_property
 75    def additional_properties_type():
 76        """
 77        This must be a method because a model may have properties that are
 78        of type self, this must run after the class is loaded
 79        """
 80        lazy_import()
 81        return (
 82            bool,
 83            date,
 84            datetime,
 85            dict,
 86            float,
 87            int,
 88            list,
 89            str,
 90            none_type,
 91        )  # noqa: E501
 92
 93    _nullable = False
 94
 95    @cached_property
 96    def openapi_types():
 97        """
 98        This must be a method because a model may have properties that are
 99        of type self, this must run after the class is loaded
100
101        Returns
102            openapi_types (dict): The key is attribute name
103                and the value is attribute type.
104        """
105        lazy_import()
106        return {
107            "values": ([float],),  # noqa: E501
108            "sparse_values": (SparseValues,),  # noqa: E501
109            "top_k": (int,),  # noqa: E501
110            "namespace": (str,),  # noqa: E501
111            "filter": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),  # noqa: E501
112        }
113
114    @cached_property
115    def discriminator():
116        return None
117
118    attribute_map = {
119        "values": "values",  # noqa: E501
120        "sparse_values": "sparseValues",  # noqa: E501
121        "top_k": "topK",  # noqa: E501
122        "namespace": "namespace",  # noqa: E501
123        "filter": "filter",  # noqa: E501
124    }
125
126    read_only_vars = {}
127
128    _composed_schemas = {}
129
130    @classmethod
131    @convert_js_args_to_python_args
132    def _from_openapi_data(cls, values, *args, **kwargs):  # noqa: E501
133        """QueryVector - a model defined in OpenAPI
134
135        Args:
136            values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
137
138        Keyword Args:
139            _check_type (bool): if True, values for parameters in openapi_types
140                                will be type checked and a TypeError will be
141                                raised if the wrong type is input.
142                                Defaults to True
143            _path_to_item (tuple/list): This is a list of keys or values to
144                                drill down to the model in received_data
145                                when deserializing a response
146            _spec_property_naming (bool): True if the variable names in the input data
147                                are serialized names, as specified in the OpenAPI document.
148                                False if the variable names in the input data
149                                are pythonic names, e.g. snake case (default)
150            _configuration (Configuration): the instance to use when
151                                deserializing a file_type parameter.
152                                If passed, type conversion is attempted
153                                If omitted no type conversion is done.
154            _visited_composed_classes (tuple): This stores a tuple of
155                                classes that we have traveled through so that
156                                if we see that class again we will not use its
157                                discriminator again.
158                                When traveling through a discriminator, the
159                                composed schema that is
160                                is traveled through is added to this set.
161                                For example if Animal has a discriminator
162                                petType and we pass in "Dog", and the class Dog
163                                allOf includes Animal, we move through Animal
164                                once using the discriminator, and pick Dog.
165                                Then in Dog, we will make an instance of the
166                                Animal class but this time we won't travel
167                                through its discriminator because we passed in
168                                _visited_composed_classes = (Animal,)
169            sparse_values (SparseValues): The sparse data of the query vector [optional]  # noqa: E501
170            top_k (int): An override for the number of results to return for this query vector.. [optional]  # noqa: E501
171            namespace (str): An override the namespace to search.. [optional]  # noqa: E501
172            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional]  # noqa: E501
173        """
174
175        _check_type = kwargs.pop("_check_type", True)
176        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
177        _path_to_item = kwargs.pop("_path_to_item", ())
178        _configuration = kwargs.pop("_configuration", None)
179        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
180
181        self = super(OpenApiModel, cls).__new__(cls)
182
183        if args:
184            raise ApiTypeError(
185                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
186                % (
187                    args,
188                    self.__class__.__name__,
189                ),
190                path_to_item=_path_to_item,
191                valid_classes=(self.__class__,),
192            )
193
194        self._data_store = {}
195        self._check_type = _check_type
196        self._spec_property_naming = _spec_property_naming
197        self._path_to_item = _path_to_item
198        self._configuration = _configuration
199        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
200
201        self.values = values
202        for var_name, var_value in kwargs.items():
203            if (
204                var_name not in self.attribute_map
205                and self._configuration is not None
206                and self._configuration.discard_unknown_keys
207                and self.additional_properties_type is None
208            ):
209                # discard variable.
210                continue
211            setattr(self, var_name, var_value)
212        return self
213
214    required_properties = set(
215        [
216            "_data_store",
217            "_check_type",
218            "_spec_property_naming",
219            "_path_to_item",
220            "_configuration",
221            "_visited_composed_classes",
222        ]
223    )
224
225    @convert_js_args_to_python_args
226    def __init__(self, values, *args, **kwargs):  # noqa: E501
227        """QueryVector - a model defined in OpenAPI
228
229        Args:
230            values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
231
232        Keyword Args:
233            _check_type (bool): if True, values for parameters in openapi_types
234                                will be type checked and a TypeError will be
235                                raised if the wrong type is input.
236                                Defaults to True
237            _path_to_item (tuple/list): This is a list of keys or values to
238                                drill down to the model in received_data
239                                when deserializing a response
240            _spec_property_naming (bool): True if the variable names in the input data
241                                are serialized names, as specified in the OpenAPI document.
242                                False if the variable names in the input data
243                                are pythonic names, e.g. snake case (default)
244            _configuration (Configuration): the instance to use when
245                                deserializing a file_type parameter.
246                                If passed, type conversion is attempted
247                                If omitted no type conversion is done.
248            _visited_composed_classes (tuple): This stores a tuple of
249                                classes that we have traveled through so that
250                                if we see that class again we will not use its
251                                discriminator again.
252                                When traveling through a discriminator, the
253                                composed schema that is
254                                is traveled through is added to this set.
255                                For example if Animal has a discriminator
256                                petType and we pass in "Dog", and the class Dog
257                                allOf includes Animal, we move through Animal
258                                once using the discriminator, and pick Dog.
259                                Then in Dog, we will make an instance of the
260                                Animal class but this time we won't travel
261                                through its discriminator because we passed in
262                                _visited_composed_classes = (Animal,)
263            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
264            top_k (int): An override for the number of results to return for this query vector.. [optional]  # noqa: E501
265            namespace (str): An override the namespace to search.. [optional]  # noqa: E501
266            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional]  # noqa: E501
267        """
268
269        _check_type = kwargs.pop("_check_type", True)
270        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
271        _path_to_item = kwargs.pop("_path_to_item", ())
272        _configuration = kwargs.pop("_configuration", None)
273        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
274
275        if args:
276            raise ApiTypeError(
277                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
278                % (
279                    args,
280                    self.__class__.__name__,
281                ),
282                path_to_item=_path_to_item,
283                valid_classes=(self.__class__,),
284            )
285
286        self._data_store = {}
287        self._check_type = _check_type
288        self._spec_property_naming = _spec_property_naming
289        self._path_to_item = _path_to_item
290        self._configuration = _configuration
291        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
292
293        self.values = values
294        for var_name, var_value in kwargs.items():
295            if (
296                var_name not in self.attribute_map
297                and self._configuration is not None
298                and self._configuration.discard_unknown_keys
299                and self.additional_properties_type is None
300            ):
301                # discard variable.
302                continue
303            setattr(self, var_name, var_value)
304            if var_name in self.read_only_vars:
305                raise ApiAttributeError(
306                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
307                    f"class with read only attributes."
308                )

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

Attributes:
  • allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values.
  • attribute_map (dict): The key is attribute name and the value is json key in definition.
  • discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name.
  • validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex.
  • additional_properties_type (tuple): A tuple of classes accepted as additional properties values.
@convert_js_args_to_python_args
QueryVector(values, *args, **kwargs)
225    @convert_js_args_to_python_args
226    def __init__(self, values, *args, **kwargs):  # noqa: E501
227        """QueryVector - a model defined in OpenAPI
228
229        Args:
230            values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
231
232        Keyword Args:
233            _check_type (bool): if True, values for parameters in openapi_types
234                                will be type checked and a TypeError will be
235                                raised if the wrong type is input.
236                                Defaults to True
237            _path_to_item (tuple/list): This is a list of keys or values to
238                                drill down to the model in received_data
239                                when deserializing a response
240            _spec_property_naming (bool): True if the variable names in the input data
241                                are serialized names, as specified in the OpenAPI document.
242                                False if the variable names in the input data
243                                are pythonic names, e.g. snake case (default)
244            _configuration (Configuration): the instance to use when
245                                deserializing a file_type parameter.
246                                If passed, type conversion is attempted
247                                If omitted no type conversion is done.
248            _visited_composed_classes (tuple): This stores a tuple of
249                                classes that we have traveled through so that
250                                if we see that class again we will not use its
251                                discriminator again.
252                                When traveling through a discriminator, the
253                                composed schema that is
254                                is traveled through is added to this set.
255                                For example if Animal has a discriminator
256                                petType and we pass in "Dog", and the class Dog
257                                allOf includes Animal, we move through Animal
258                                once using the discriminator, and pick Dog.
259                                Then in Dog, we will make an instance of the
260                                Animal class but this time we won't travel
261                                through its discriminator because we passed in
262                                _visited_composed_classes = (Animal,)
263            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
264            top_k (int): An override for the number of results to return for this query vector.. [optional]  # noqa: E501
265            namespace (str): An override the namespace to search.. [optional]  # noqa: E501
266            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional]  # noqa: E501
267        """
268
269        _check_type = kwargs.pop("_check_type", True)
270        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
271        _path_to_item = kwargs.pop("_path_to_item", ())
272        _configuration = kwargs.pop("_configuration", None)
273        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
274
275        if args:
276            raise ApiTypeError(
277                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
278                % (
279                    args,
280                    self.__class__.__name__,
281                ),
282                path_to_item=_path_to_item,
283                valid_classes=(self.__class__,),
284            )
285
286        self._data_store = {}
287        self._check_type = _check_type
288        self._spec_property_naming = _spec_property_naming
289        self._path_to_item = _path_to_item
290        self._configuration = _configuration
291        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
292
293        self.values = values
294        for var_name, var_value in kwargs.items():
295            if (
296                var_name not in self.attribute_map
297                and self._configuration is not None
298                and self._configuration.discard_unknown_keys
299                and self.additional_properties_type is None
300            ):
301                # discard variable.
302                continue
303            setattr(self, var_name, var_value)
304            if var_name in self.read_only_vars:
305                raise ApiAttributeError(
306                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
307                    f"class with read only attributes."
308                )

QueryVector - a model defined in OpenAPI

Arguments:
  • values ([float]): The query vector values. This should be the same length as the dimension of the index being queried.
Keyword Args:

_check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) sparse_values (SparseValues): This is the sparse data of the vector [optional] # noqa: E501 top_k (int): An override for the number of results to return for this query vector.. [optional] # noqa: E501 namespace (str): An override the namespace to search.. [optional] # noqa: E501 filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional] # noqa: E501

allowed_values = {}
validations = {('values',): {}, ('top_k',): {'inclusive_maximum': 10000, 'inclusive_minimum': 1}}
def additional_properties_type(unknown):

This must be a method because a model may have properties that are of type self, this must run after the class is loaded

def openapi_types(unknown):

This must be a method because a model may have properties that are of type self, this must run after the class is loaded

Returns openapi_types (dict): The key is attribute name and the value is attribute type.

def discriminator(unknown):
attribute_map = {'values': 'values', 'sparse_values': 'sparseValues', 'top_k': 'topK', 'namespace': 'namespace', 'filter': 'filter'}
read_only_vars = {}
required_properties = {'_spec_property_naming', '_data_store', '_check_type', '_visited_composed_classes', '_configuration', '_path_to_item'}
values