pinecone.core.client.model.scored_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 ScoredVector(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        ("id",): {
 67            "max_length": 512,
 68            "min_length": 1,
 69        },
 70    }
 71
 72    @cached_property
 73    def additional_properties_type():
 74        """
 75        This must be a method because a model may have properties that are
 76        of type self, this must run after the class is loaded
 77        """
 78        lazy_import()
 79        return (
 80            bool,
 81            date,
 82            datetime,
 83            dict,
 84            float,
 85            int,
 86            list,
 87            str,
 88            none_type,
 89        )  # noqa: E501
 90
 91    _nullable = False
 92
 93    @cached_property
 94    def openapi_types():
 95        """
 96        This must be a method because a model may have properties that are
 97        of type self, this must run after the class is loaded
 98
 99        Returns
100            openapi_types (dict): The key is attribute name
101                and the value is attribute type.
102        """
103        lazy_import()
104        return {
105            "id": (str,),  # noqa: E501
106            "score": (float,),  # noqa: E501
107            "values": ([float],),  # noqa: E501
108            "sparse_values": (SparseValues,),  # noqa: E501
109            "metadata": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),  # noqa: E501
110        }
111
112    @cached_property
113    def discriminator():
114        return None
115
116    attribute_map = {
117        "id": "id",  # noqa: E501
118        "score": "score",  # noqa: E501
119        "values": "values",  # noqa: E501
120        "sparse_values": "sparseValues",  # noqa: E501
121        "metadata": "metadata",  # noqa: E501
122    }
123
124    read_only_vars = {}
125
126    _composed_schemas = {}
127
128    @classmethod
129    @convert_js_args_to_python_args
130    def _from_openapi_data(cls, id, *args, **kwargs):  # noqa: E501
131        """ScoredVector - a model defined in OpenAPI
132
133        Args:
134            id (str): This is the vector's unique id.
135
136        Keyword Args:
137            _check_type (bool): if True, values for parameters in openapi_types
138                                will be type checked and a TypeError will be
139                                raised if the wrong type is input.
140                                Defaults to True
141            _path_to_item (tuple/list): This is a list of keys or values to
142                                drill down to the model in received_data
143                                when deserializing a response
144            _spec_property_naming (bool): True if the variable names in the input data
145                                are serialized names, as specified in the OpenAPI document.
146                                False if the variable names in the input data
147                                are pythonic names, e.g. snake case (default)
148            _configuration (Configuration): the instance to use when
149                                deserializing a file_type parameter.
150                                If passed, type conversion is attempted
151                                If omitted no type conversion is done.
152            _visited_composed_classes (tuple): This stores a tuple of
153                                classes that we have traveled through so that
154                                if we see that class again we will not use its
155                                discriminator again.
156                                When traveling through a discriminator, the
157                                composed schema that is
158                                is traveled through is added to this set.
159                                For example if Animal has a discriminator
160                                petType and we pass in "Dog", and the class Dog
161                                allOf includes Animal, we move through Animal
162                                once using the discriminator, and pick Dog.
163                                Then in Dog, we will make an instance of the
164                                Animal class but this time we won't travel
165                                through its discriminator because we passed in
166                                _visited_composed_classes = (Animal,)
167            score (float): This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.. [optional]  # noqa: E501
168            values ([float]): This is the vector data, if it is requested.. [optional]  # noqa: E501
169            sparse_values (SparseValues): the sparse data of the vector [optional]  # noqa: E501
170            metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [optional]  # noqa: E501
171        """
172
173        _check_type = kwargs.pop("_check_type", True)
174        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
175        _path_to_item = kwargs.pop("_path_to_item", ())
176        _configuration = kwargs.pop("_configuration", None)
177        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
178
179        self = super(OpenApiModel, cls).__new__(cls)
180
181        if args:
182            raise ApiTypeError(
183                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
184                % (
185                    args,
186                    self.__class__.__name__,
187                ),
188                path_to_item=_path_to_item,
189                valid_classes=(self.__class__,),
190            )
191
192        self._data_store = {}
193        self._check_type = _check_type
194        self._spec_property_naming = _spec_property_naming
195        self._path_to_item = _path_to_item
196        self._configuration = _configuration
197        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
198
199        self.id = id
200        for var_name, var_value in kwargs.items():
201            if (
202                var_name not in self.attribute_map
203                and self._configuration is not None
204                and self._configuration.discard_unknown_keys
205                and self.additional_properties_type is None
206            ):
207                # discard variable.
208                continue
209            setattr(self, var_name, var_value)
210        return self
211
212    required_properties = set(
213        [
214            "_data_store",
215            "_check_type",
216            "_spec_property_naming",
217            "_path_to_item",
218            "_configuration",
219            "_visited_composed_classes",
220        ]
221    )
222
223    @convert_js_args_to_python_args
224    def __init__(self, id, *args, **kwargs):  # noqa: E501
225        """ScoredVector - a model defined in OpenAPI
226
227        Args:
228            id (str): This is the vector's unique id.
229
230        Keyword Args:
231            _check_type (bool): if True, values for parameters in openapi_types
232                                will be type checked and a TypeError will be
233                                raised if the wrong type is input.
234                                Defaults to True
235            _path_to_item (tuple/list): This is a list of keys or values to
236                                drill down to the model in received_data
237                                when deserializing a response
238            _spec_property_naming (bool): True if the variable names in the input data
239                                are serialized names, as specified in the OpenAPI document.
240                                False if the variable names in the input data
241                                are pythonic names, e.g. snake case (default)
242            _configuration (Configuration): the instance to use when
243                                deserializing a file_type parameter.
244                                If passed, type conversion is attempted
245                                If omitted no type conversion is done.
246            _visited_composed_classes (tuple): This stores a tuple of
247                                classes that we have traveled through so that
248                                if we see that class again we will not use its
249                                discriminator again.
250                                When traveling through a discriminator, the
251                                composed schema that is
252                                is traveled through is added to this set.
253                                For example if Animal has a discriminator
254                                petType and we pass in "Dog", and the class Dog
255                                allOf includes Animal, we move through Animal
256                                once using the discriminator, and pick Dog.
257                                Then in Dog, we will make an instance of the
258                                Animal class but this time we won't travel
259                                through its discriminator because we passed in
260                                _visited_composed_classes = (Animal,)
261            score (float): This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.. [optional]  # noqa: E501
262            values ([float]): This is the vector data, if it is requested.. [optional]  # noqa: E501
263            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
264            metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [optional]  # noqa: E501
265        """
266
267        _check_type = kwargs.pop("_check_type", True)
268        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
269        _path_to_item = kwargs.pop("_path_to_item", ())
270        _configuration = kwargs.pop("_configuration", None)
271        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
272
273        if args:
274            raise ApiTypeError(
275                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
276                % (
277                    args,
278                    self.__class__.__name__,
279                ),
280                path_to_item=_path_to_item,
281                valid_classes=(self.__class__,),
282            )
283
284        self._data_store = {}
285        self._check_type = _check_type
286        self._spec_property_naming = _spec_property_naming
287        self._path_to_item = _path_to_item
288        self._configuration = _configuration
289        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
290
291        self.id = id
292        for var_name, var_value in kwargs.items():
293            if (
294                var_name not in self.attribute_map
295                and self._configuration is not None
296                and self._configuration.discard_unknown_keys
297                and self.additional_properties_type is None
298            ):
299                # discard variable.
300                continue
301            setattr(self, var_name, var_value)
302            if var_name in self.read_only_vars:
303                raise ApiAttributeError(
304                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
305                    f"class with read only attributes."
306                )
def lazy_import():
34def lazy_import():
35    from pinecone.core.client.model.sparse_values import SparseValues
36
37    globals()["SparseValues"] = SparseValues
class ScoredVector(pinecone.core.client.model_utils.ModelNormal):
 40class ScoredVector(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        ("id",): {
 68            "max_length": 512,
 69            "min_length": 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            "id": (str,),  # noqa: E501
107            "score": (float,),  # noqa: E501
108            "values": ([float],),  # noqa: E501
109            "sparse_values": (SparseValues,),  # noqa: E501
110            "metadata": ({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        "id": "id",  # noqa: E501
119        "score": "score",  # noqa: E501
120        "values": "values",  # noqa: E501
121        "sparse_values": "sparseValues",  # noqa: E501
122        "metadata": "metadata",  # 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, id, *args, **kwargs):  # noqa: E501
132        """ScoredVector - a model defined in OpenAPI
133
134        Args:
135            id (str): This is the vector's unique id.
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            score (float): This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.. [optional]  # noqa: E501
169            values ([float]): This is the vector data, if it is requested.. [optional]  # noqa: E501
170            sparse_values (SparseValues): the sparse data of the vector [optional]  # noqa: E501
171            metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [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.id = id
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, id, *args, **kwargs):  # noqa: E501
226        """ScoredVector - a model defined in OpenAPI
227
228        Args:
229            id (str): This is the vector's unique id.
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            score (float): This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.. [optional]  # noqa: E501
263            values ([float]): This is the vector data, if it is requested.. [optional]  # noqa: E501
264            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
265            metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [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.id = id
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                )

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
ScoredVector(id, *args, **kwargs)
224    @convert_js_args_to_python_args
225    def __init__(self, id, *args, **kwargs):  # noqa: E501
226        """ScoredVector - a model defined in OpenAPI
227
228        Args:
229            id (str): This is the vector's unique id.
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            score (float): This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.. [optional]  # noqa: E501
263            values ([float]): This is the vector data, if it is requested.. [optional]  # noqa: E501
264            sparse_values (SparseValues): This is the sparse data of the vector [optional]  # noqa: E501
265            metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [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.id = id
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                )

ScoredVector - a model defined in OpenAPI

Arguments:
  • id (str): This is the vector's unique id.
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,) score (float): This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar.. [optional] # noqa: E501 values ([float]): This is the vector data, if it is requested.. [optional] # noqa: E501 sparse_values (SparseValues): This is the sparse data of the vector [optional] # noqa: E501 metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [optional] # noqa: E501

allowed_values = {}
validations = {('id',): {'max_length': 512, 'min_length': 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 = {'id': 'id', 'score': 'score', 'values': 'values', 'sparse_values': 'sparseValues', 'metadata': 'metadata'}
read_only_vars = {}
required_properties = {'_spec_property_naming', '_data_store', '_check_type', '_visited_composed_classes', '_configuration', '_path_to_item'}
id