From 8f17fbb4d8d77cafa78b2c3067a5abb5d2f95d50 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Fri, 9 Feb 2024 12:15:33 -0500 Subject: [PATCH 1/2] Update generated code --- pinecone/core/client/__init__.py | 5 +- .../core/client/api/manage_indexes_api.py | 45 +-- .../core/client/api/vector_operations_api.py | 137 +++++++- pinecone/core/client/api_client.py | 5 +- pinecone/core/client/configuration.py | 9 +- pinecone/core/client/exceptions.py | 5 +- pinecone/core/client/model/collection_list.py | 5 +- .../core/client/model/collection_model.py | 27 +- .../client/model/configure_index_request.py | 5 +- .../model/configure_index_request_spec.py | 5 +- .../model/configure_index_request_spec_pod.py | 5 +- .../client/model/create_collection_request.py | 16 +- .../core/client/model/create_index_request.py | 38 ++- pinecone/core/client/model/delete_request.py | 5 +- .../model/describe_index_stats_request.py | 5 +- .../model/describe_index_stats_response.py | 5 +- pinecone/core/client/model/error_response.py | 9 +- .../core/client/model/error_response_error.py | 11 +- pinecone/core/client/model/fetch_response.py | 5 +- pinecone/core/client/model/index_list.py | 5 +- pinecone/core/client/model/index_model.py | 40 ++- .../core/client/model/index_model_spec.py | 5 +- .../core/client/model/index_model_status.py | 6 +- .../model/{gcp_regions.py => list_item.py} | 146 ++++----- .../{aws_regions.py => list_response.py} | 159 ++++----- .../core/client/model/namespace_summary.py | 5 +- pinecone/core/client/model/pagination.py | 256 +++++++++++++++ pinecone/core/client/model/pod_spec.py | 9 +- .../client/model/pod_spec_metadata_config.py | 9 +- pinecone/core/client/model/protobuf_any.py | 5 +- .../core/client/model/protobuf_null_value.py | 5 +- pinecone/core/client/model/query_request.py | 5 +- pinecone/core/client/model/query_response.py | 5 +- pinecone/core/client/model/query_vector.py | 5 +- pinecone/core/client/model/rpc_status.py | 5 +- pinecone/core/client/model/scored_vector.py | 5 +- pinecone/core/client/model/serverless_spec.py | 13 +- .../core/client/model/single_query_results.py | 5 +- pinecone/core/client/model/sparse_values.py | 5 +- pinecone/core/client/model/update_request.py | 5 +- pinecone/core/client/model/upsert_request.py | 5 +- pinecone/core/client/model/upsert_response.py | 5 +- pinecone/core/client/model/usage.py | 5 +- pinecone/core/client/model/vector.py | 5 +- pinecone/core/client/model_utils.py | 5 +- pinecone/core/client/models/__init__.py | 5 +- pinecone/core/client/rest.py | 5 +- .../core/grpc/protos/vector_service_pb2.py | 303 ++++++++++++++++-- .../core/grpc/protos/vector_service_pb2.pyi | 68 ++++ .../grpc/protos/vector_service_pb2_grpc.py | 43 +++ 50 files changed, 1129 insertions(+), 370 deletions(-) rename pinecone/core/client/model/{gcp_regions.py => list_item.py} (72%) rename pinecone/core/client/model/{aws_regions.py => list_response.py} (75%) create mode 100644 pinecone/core/client/model/pagination.py diff --git a/pinecone/core/client/__init__.py b/pinecone/core/client/__init__.py index 0746e0651..b8bbd9ff1 100644 --- a/pinecone/core/client/__init__.py +++ b/pinecone/core/client/__init__.py @@ -1,11 +1,12 @@ # flake8: noqa """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/api/manage_indexes_api.py b/pinecone/core/client/api/manage_indexes_api.py index d74f1124a..5dfabe9c0 100644 --- a/pinecone/core/client/api/manage_indexes_api.py +++ b/pinecone/core/client/api/manage_indexes_api.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -49,9 +50,9 @@ def __configure_index( configure_index_request, **kwargs ): - """configure_index # noqa: E501 + """Configure an index # noqa: E501 - This operation specifies the pod type and number of replicas for an index. # noqa: E501 + This operation specifies the pod type and number of replicas for an index. It applies to pod-based indexes only. Serverless indexes scale automatically based on usage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -59,7 +60,7 @@ def __configure_index( >>> result = thread.get() Args: - index_name (str): The name of the index to configure + index_name (str): The name of the index to configure. configure_index_request (ConfigureIndexRequest): The desired pod type and replica configuration for the index. Keyword Args: @@ -183,9 +184,9 @@ def __create_collection( create_collection_request, **kwargs ): - """create_collection # noqa: E501 + """Create a collection # noqa: E501 - This operation creates a Pinecone collection. # noqa: E501 + This operation creates a Pinecone collection. Serverless and starter indexes do not support collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -308,7 +309,7 @@ def __create_index( create_index_request, **kwargs ): - """create_index # noqa: E501 + """Create an index # noqa: E501 This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -433,9 +434,9 @@ def __delete_collection( collection_name, **kwargs ): - """delete_collection # noqa: E501 + """Delete a collection # noqa: E501 - This operation deletes an existing collection. # noqa: E501 + This operation deletes an existing collection. Serverless and starter indexes do not support collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -443,7 +444,7 @@ def __delete_collection( >>> result = thread.get() Args: - collection_name (str): The name of the collection + collection_name (str): The name of the collection. Keyword Args: _return_http_data_only (bool): response data without head status @@ -558,7 +559,7 @@ def __delete_index( index_name, **kwargs ): - """delete_index # noqa: E501 + """Delete an index # noqa: E501 This operation deletes an existing index. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -568,7 +569,7 @@ def __delete_index( >>> result = thread.get() Args: - index_name (str): The name of the index to delete + index_name (str): The name of the index to delete. Keyword Args: _return_http_data_only (bool): response data without head status @@ -682,9 +683,9 @@ def __describe_collection( collection_name, **kwargs ): - """describe_collection # noqa: E501 + """Describe a collection # noqa: E501 - This operation gets a description of a collection. # noqa: E501 + This operation gets a description of a collection. Serverless and starter indexes do not support collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -692,7 +693,7 @@ def __describe_collection( >>> result = thread.get() Args: - collection_name (str): The name of the collection to be described + collection_name (str): The name of the collection to be described. Keyword Args: _return_http_data_only (bool): response data without head status @@ -806,7 +807,7 @@ def __describe_index( index_name, **kwargs ): - """describe_index # noqa: E501 + """Describe an index # noqa: E501 Get a description of an index. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -816,7 +817,7 @@ def __describe_index( >>> result = thread.get() Args: - index_name (str): The name of the index to be described + index_name (str): The name of the index to be described. Keyword Args: _return_http_data_only (bool): response data without head status @@ -929,9 +930,9 @@ def __list_collections( self, **kwargs ): - """list_collections # noqa: E501 + """List collections # noqa: E501 - This operation returns a list of your Pinecone collections. # noqa: E501 + This operation returns a list of your Pinecone collections. Serverless and starter indexes do not support collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1041,9 +1042,9 @@ def __list_indexes( self, **kwargs ): - """list_indexes # noqa: E501 + """List indexes # noqa: E501 - This operation returns a list of your Pinecone indexes. # noqa: E501 + This operation returns a list of all indexes in a project. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/pinecone/core/client/api/vector_operations_api.py b/pinecone/core/client/api/vector_operations_api.py index 9c423051e..80db2084a 100644 --- a/pinecone/core/client/api/vector_operations_api.py +++ b/pinecone/core/client/api/vector_operations_api.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -25,6 +26,7 @@ from pinecone.core.client.model.describe_index_stats_request import DescribeIndexStatsRequest from pinecone.core.client.model.describe_index_stats_response import DescribeIndexStatsResponse from pinecone.core.client.model.fetch_response import FetchResponse +from pinecone.core.client.model.list_response import ListResponse from pinecone.core.client.model.query_request import QueryRequest from pinecone.core.client.model.query_response import QueryResponse from pinecone.core.client.model.rpc_status import RpcStatus @@ -644,6 +646,137 @@ def __fetch( callable=__fetch ) + def __list( + self, + **kwargs + ): + """List # noqa: E501 + + The `List` operations lists the IDs of vectors in a single namespace. An optional prefix can be passed to limit the listing to those ids that start with the given prefix. Ids are returned in sorted order (bitwise/\"C\" collation). A maximum of 100 ids are returned at a time. A pagination token is also returned to allow the client to list the next 100. The absence of the pagination token indicates that there are no more ids that match the given parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + prefix (str): The vector IDs to fetch. Does not accept values containing spaces.. [optional] + limit (int): Max number of ids to return.. [optional] + pagination_token (str): Pagination token to continue a previous listing operation.. [optional] + namespace (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ListResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.list = _Endpoint( + settings={ + 'response_type': (ListResponse,), + 'auth': [ + 'ApiKeyAuth' + ], + 'endpoint_path': '/vectors/list', + 'operation_id': 'list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'prefix', + 'limit', + 'pagination_token', + 'namespace', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'prefix': + (str,), + 'limit': + (int,), + 'pagination_token': + (str,), + 'namespace': + (str,), + }, + 'attribute_map': { + 'prefix': 'prefix', + 'limit': 'limit', + 'pagination_token': 'paginationToken', + 'namespace': 'namespace', + }, + 'location_map': { + 'prefix': 'query', + 'limit': 'query', + 'pagination_token': 'query', + 'namespace': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__list + ) + def __query( self, query_request, diff --git a/pinecone/core/client/api_client.py b/pinecone/core/client/api_client.py index de64b8aed..ba404c26e 100644 --- a/pinecone/core/client/api_client.py +++ b/pinecone/core/client/api_client.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/configuration.py b/pinecone/core/client/configuration.py index a7ab0cd4c..2e7b21409 100644 --- a/pinecone/core/client/configuration.py +++ b/pinecone/core/client/configuration.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -405,7 +406,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.0\n"\ + "Version of the API: v1\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) @@ -417,7 +418,7 @@ def get_host_settings(self): return [ { 'url': "https://api.pinecone.io", - 'description': "No description provided", + 'description': "Production API endpoints; unversioned legacy.", } ] diff --git a/pinecone/core/client/exceptions.py b/pinecone/core/client/exceptions.py index 665dada66..dc40885c8 100644 --- a/pinecone/core/client/exceptions.py +++ b/pinecone/core/client/exceptions.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/collection_list.py b/pinecone/core/client/model/collection_list.py index 1317d964c..18b4e8e3b 100644 --- a/pinecone/core/client/model/collection_list.py +++ b/pinecone/core/client/model/collection_list.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/collection_model.py b/pinecone/core/client/model/collection_model.py index 42992a404..d1ad1b75e 100644 --- a/pinecone/core/client/model/collection_model.py +++ b/pinecone/core/client/model/collection_model.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -92,10 +93,10 @@ def openapi_types(): return { 'name': (str,), # noqa: E501 'status': (str,), # noqa: E501 + 'environment': (str,), # noqa: E501 'size': (int,), # noqa: E501 'dimension': (int,), # noqa: E501 'vector_count': (int,), # noqa: E501 - 'environment': (str,), # noqa: E501 } @cached_property @@ -106,10 +107,10 @@ def discriminator(): attribute_map = { 'name': 'name', # noqa: E501 'status': 'status', # noqa: E501 + 'environment': 'environment', # noqa: E501 'size': 'size', # noqa: E501 'dimension': 'dimension', # noqa: E501 'vector_count': 'vector_count', # noqa: E501 - 'environment': 'environment', # noqa: E501 } read_only_vars = { @@ -119,12 +120,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, name, status, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, status, environment, *args, **kwargs): # noqa: E501 """CollectionModel - a model defined in OpenAPI Args: name (str): status (str): The status of the collection. + environment (str): The environment where the collection is hosted. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -158,9 +160,8 @@ def _from_openapi_data(cls, name, status, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) size (int): The size of the collection in bytes.. [optional] # noqa: E501 - dimension (int): The dimension of the vectors stored in each record held in the collection. [optional] # noqa: E501 - vector_count (int): The number of records stored in the collection. [optional] # noqa: E501 - environment (str): The environment where the collection is hosted.. [optional] # noqa: E501 + dimension (int): The dimension of the vectors stored in each record held in the collection.. [optional] # noqa: E501 + vector_count (int): The number of records stored in the collection.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -190,6 +191,7 @@ def _from_openapi_data(cls, name, status, *args, **kwargs): # noqa: E501 self.name = name self.status = status + self.environment = environment for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -210,12 +212,13 @@ def _from_openapi_data(cls, name, status, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, name, status, *args, **kwargs): # noqa: E501 + def __init__(self, name, status, environment, *args, **kwargs): # noqa: E501 """CollectionModel - a model defined in OpenAPI Args: name (str): status (str): The status of the collection. + environment (str): The environment where the collection is hosted. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -249,9 +252,8 @@ def __init__(self, name, status, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) size (int): The size of the collection in bytes.. [optional] # noqa: E501 - dimension (int): The dimension of the vectors stored in each record held in the collection. [optional] # noqa: E501 - vector_count (int): The number of records stored in the collection. [optional] # noqa: E501 - environment (str): The environment where the collection is hosted.. [optional] # noqa: E501 + dimension (int): The dimension of the vectors stored in each record held in the collection.. [optional] # noqa: E501 + vector_count (int): The number of records stored in the collection.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -279,6 +281,7 @@ def __init__(self, name, status, *args, **kwargs): # noqa: E501 self.name = name self.status = status + self.environment = environment for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/pinecone/core/client/model/configure_index_request.py b/pinecone/core/client/model/configure_index_request.py index 0cf62d638..12ca8e239 100644 --- a/pinecone/core/client/model/configure_index_request.py +++ b/pinecone/core/client/model/configure_index_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/configure_index_request_spec.py b/pinecone/core/client/model/configure_index_request_spec.py index 151a9955d..ab49b7797 100644 --- a/pinecone/core/client/model/configure_index_request_spec.py +++ b/pinecone/core/client/model/configure_index_request_spec.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/configure_index_request_spec_pod.py b/pinecone/core/client/model/configure_index_request_spec_pod.py index 8a8adab60..8e92a4c23 100644 --- a/pinecone/core/client/model/configure_index_request_spec_pod.py +++ b/pinecone/core/client/model/configure_index_request_spec_pod.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/create_collection_request.py b/pinecone/core/client/model/create_collection_request.py index 30f9041f2..01e3e7df9 100644 --- a/pinecone/core/client/model/create_collection_request.py +++ b/pinecone/core/client/model/create_collection_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -58,6 +59,13 @@ class CreateCollectionRequest(ModelNormal): } validations = { + ('name',): { + 'max_length': 45, + 'min_length': 1, + 'regex': { + 'pattern': r'^[A-Za-z0-9].*[A-Za-z0-9]$', # noqa: E501 + }, + }, } @cached_property @@ -106,7 +114,7 @@ def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 """CreateCollectionRequest - a model defined in OpenAPI Args: - name (str): The name of the collection to be created. + name (str): The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. source (str): The name of the index to be used as the source for the collection. Keyword Args: @@ -193,7 +201,7 @@ def __init__(self, name, source, *args, **kwargs): # noqa: E501 """CreateCollectionRequest - a model defined in OpenAPI Args: - name (str): The name of the collection to be created. + name (str): The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. source (str): The name of the index to be used as the source for the collection. Keyword Args: diff --git a/pinecone/core/client/model/create_index_request.py b/pinecone/core/client/model/create_index_request.py index e362ad43d..56357ece7 100644 --- a/pinecone/core/client/model/create_index_request.py +++ b/pinecone/core/client/model/create_index_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -63,6 +64,13 @@ class CreateIndexRequest(ModelNormal): } validations = { + ('name',): { + 'max_length': 45, + 'min_length': 1, + 'regex': { + 'pattern': r'^[A-Za-z0-9].*[A-Za-z0-9]$', # noqa: E501 + }, + }, ('dimension',): { 'inclusive_maximum': 20000, 'inclusive_minimum': 1, @@ -92,8 +100,8 @@ def openapi_types(): return { 'name': (str,), # noqa: E501 'dimension': (int,), # noqa: E501 - 'metric': (str,), # noqa: E501 'spec': (dict,), # noqa: E501 + 'metric': (str,), # noqa: E501 } @cached_property @@ -104,8 +112,8 @@ def discriminator(): attribute_map = { 'name': 'name', # noqa: E501 'dimension': 'dimension', # noqa: E501 - 'metric': 'metric', # noqa: E501 'spec': 'spec', # noqa: E501 + 'metric': 'metric', # noqa: E501 } read_only_vars = { @@ -115,14 +123,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, name, dimension, metric, spec, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, dimension, spec, *args, **kwargs): # noqa: E501 """CreateIndexRequest - a model defined in OpenAPI Args: - name (str): The name of the index. The maximum length is 45 characters. It may contain lowercase alphanumeric characters or hyphens, and must not begin or end with a hyphen. - dimension (int): The dimensions of the vectors to be inserted in the index - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. - spec (dict): Spec objects describe how the index should be deployed + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + dimension (int): The dimensions of the vectors to be inserted in the index. + spec (dict): The spec object defines how the index should be deployed. For serverless indexes, you define only the cloud and region where the index should be hosted. For pod-based indexes, you define the environment where the index should be hosted, the pod type and size to use, and other index characteristics. Serverless indexes are in public preview and are available only on AWS in the us-west-2 region. Test thoroughly before using serverless indexes in production. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -155,6 +162,7 @@ def _from_openapi_data(cls, name, dimension, metric, spec, *args, **kwargs): # Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.. [optional] if omitted the server will use the default value of "cosine" # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -184,7 +192,6 @@ def _from_openapi_data(cls, name, dimension, metric, spec, *args, **kwargs): # self.name = name self.dimension = dimension - self.metric = metric self.spec = spec for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ @@ -206,14 +213,13 @@ def _from_openapi_data(cls, name, dimension, metric, spec, *args, **kwargs): # ]) @convert_js_args_to_python_args - def __init__(self, name, dimension, metric, spec, *args, **kwargs): # noqa: E501 + def __init__(self, name, dimension, spec, *args, **kwargs): # noqa: E501 """CreateIndexRequest - a model defined in OpenAPI Args: - name (str): The name of the index. The maximum length is 45 characters. It may contain lowercase alphanumeric characters or hyphens, and must not begin or end with a hyphen. - dimension (int): The dimensions of the vectors to be inserted in the index - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. - spec (dict): Spec objects describe how the index should be deployed + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + dimension (int): The dimensions of the vectors to be inserted in the index. + spec (dict): The spec object defines how the index should be deployed. For serverless indexes, you define only the cloud and region where the index should be hosted. For pod-based indexes, you define the environment where the index should be hosted, the pod type and size to use, and other index characteristics. Serverless indexes are in public preview and are available only on AWS in the us-west-2 region. Test thoroughly before using serverless indexes in production. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -246,6 +252,7 @@ def __init__(self, name, dimension, metric, spec, *args, **kwargs): # noqa: E50 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.. [optional] if omitted the server will use the default value of "cosine" # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -273,7 +280,6 @@ def __init__(self, name, dimension, metric, spec, *args, **kwargs): # noqa: E50 self.name = name self.dimension = dimension - self.metric = metric self.spec = spec for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ diff --git a/pinecone/core/client/model/delete_request.py b/pinecone/core/client/model/delete_request.py index 260871be3..b324c8d4f 100644 --- a/pinecone/core/client/model/delete_request.py +++ b/pinecone/core/client/model/delete_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/describe_index_stats_request.py b/pinecone/core/client/model/describe_index_stats_request.py index 388f9c026..84d9fa4e2 100644 --- a/pinecone/core/client/model/describe_index_stats_request.py +++ b/pinecone/core/client/model/describe_index_stats_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/describe_index_stats_response.py b/pinecone/core/client/model/describe_index_stats_response.py index e04ef7e69..af0fc6e94 100644 --- a/pinecone/core/client/model/describe_index_stats_response.py +++ b/pinecone/core/client/model/describe_index_stats_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/error_response.py b/pinecone/core/client/model/error_response.py index 967176dbf..8955f943d 100644 --- a/pinecone/core/client/model/error_response.py +++ b/pinecone/core/client/model/error_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -112,7 +113,7 @@ def _from_openapi_data(cls, status, error, *args, **kwargs): # noqa: E501 """ErrorResponse - a model defined in OpenAPI Args: - status (int): The HTTP status code of the error + status (int): The HTTP status code of the error. error (ErrorResponseError): Keyword Args: @@ -199,7 +200,7 @@ def __init__(self, status, error, *args, **kwargs): # noqa: E501 """ErrorResponse - a model defined in OpenAPI Args: - status (int): The HTTP status code of the error + status (int): The HTTP status code of the error. error (ErrorResponseError): Keyword Args: diff --git a/pinecone/core/client/model/error_response_error.py b/pinecone/core/client/model/error_response_error.py index 444fa2afe..f21c15176 100644 --- a/pinecone/core/client/model/error_response_error.py +++ b/pinecone/core/client/model/error_response_error.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -56,12 +57,11 @@ class ErrorResponseError(ModelNormal): allowed_values = { ('code',): { - 'QUOTA_EXCEEDED': "QUOTA_EXCEEDED", - 'BAD_PARAMS': "BAD_PARAMS", - 'CANCELLED': "CANCELLED", + 'OK': "OK", 'UNKNOWN': "UNKNOWN", 'INVALID_ARGUMENT': "INVALID_ARGUMENT", 'DEADLINE_EXCEEDED': "DEADLINE_EXCEEDED", + 'QUOTA_EXCEEDED': "QUOTA_EXCEEDED", 'NOT_FOUND': "NOT_FOUND", 'ALREADY_EXISTS': "ALREADY_EXISTS", 'PERMISSION_DENIED': "PERMISSION_DENIED", @@ -74,6 +74,7 @@ class ErrorResponseError(ModelNormal): 'INTERNAL': "INTERNAL", 'UNAVAILABLE': "UNAVAILABLE", 'DATA_LOSS': "DATA_LOSS", + 'FORBIDDEN': "FORBIDDEN", }, } diff --git a/pinecone/core/client/model/fetch_response.py b/pinecone/core/client/model/fetch_response.py index 632596a9d..cd96d02bb 100644 --- a/pinecone/core/client/model/fetch_response.py +++ b/pinecone/core/client/model/fetch_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/index_list.py b/pinecone/core/client/model/index_list.py index fef0fb381..791972fb7 100644 --- a/pinecone/core/client/model/index_list.py +++ b/pinecone/core/client/model/index_list.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/index_model.py b/pinecone/core/client/model/index_model.py index 1910c7d31..91f527dcf 100644 --- a/pinecone/core/client/model/index_model.py +++ b/pinecone/core/client/model/index_model.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -69,6 +70,13 @@ class IndexModel(ModelNormal): } validations = { + ('name',): { + 'max_length': 45, + 'min_length': 1, + 'regex': { + 'pattern': r'^[A-Za-z0-9].*[A-Za-z0-9]$', # noqa: E501 + }, + }, ('dimension',): { 'inclusive_maximum': 20000, 'inclusive_minimum': 1, @@ -101,9 +109,9 @@ def openapi_types(): 'name': (str,), # noqa: E501 'dimension': (int,), # noqa: E501 'metric': (str,), # noqa: E501 - 'host': (str,), # noqa: E501 'spec': (IndexModelSpec,), # noqa: E501 'status': (IndexModelStatus,), # noqa: E501 + 'host': (str,), # noqa: E501 } @cached_property @@ -115,9 +123,9 @@ def discriminator(): 'name': 'name', # noqa: E501 'dimension': 'dimension', # noqa: E501 'metric': 'metric', # noqa: E501 - 'host': 'host', # noqa: E501 'spec': 'spec', # noqa: E501 'status': 'status', # noqa: E501 + 'host': 'host', # noqa: E501 } read_only_vars = { @@ -127,18 +135,17 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, name, dimension, metric, host, spec, status, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, dimension, spec, status, *args, **kwargs): # noqa: E501 """IndexModel - a model defined in OpenAPI Args: - name (str): The name of the index. The maximum length is 45 characters. It may contain lowercase alphanumeric characters or hyphens, and must not begin or end with a hyphen. - dimension (int): The dimensions of the vectors to be inserted in the index - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. - host (str): The URL address where the index is hosted. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + dimension (int): The dimensions of the vectors to be inserted in the index. spec (IndexModelSpec): status (IndexModelStatus): Keyword Args: + metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.. defaults to "cosine", must be one of ["cosine", "euclidean", "dotproduct", ] # noqa: E501 _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. @@ -169,8 +176,10 @@ def _from_openapi_data(cls, name, dimension, metric, host, spec, status, *args, Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + host (str): The URL address where the index is hosted.. [optional] # noqa: E501 """ + metric = kwargs.get('metric', "cosine") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -199,7 +208,6 @@ def _from_openapi_data(cls, name, dimension, metric, host, spec, status, *args, self.name = name self.dimension = dimension self.metric = metric - self.host = host self.spec = spec self.status = status for var_name, var_value in kwargs.items(): @@ -222,18 +230,17 @@ def _from_openapi_data(cls, name, dimension, metric, host, spec, status, *args, ]) @convert_js_args_to_python_args - def __init__(self, name, dimension, metric, host, spec, status, *args, **kwargs): # noqa: E501 + def __init__(self, name, dimension, spec, status, *args, **kwargs): # noqa: E501 """IndexModel - a model defined in OpenAPI Args: - name (str): The name of the index. The maximum length is 45 characters. It may contain lowercase alphanumeric characters or hyphens, and must not begin or end with a hyphen. - dimension (int): The dimensions of the vectors to be inserted in the index - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. - host (str): The URL address where the index is hosted. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + dimension (int): The dimensions of the vectors to be inserted in the index. spec (IndexModelSpec): status (IndexModelStatus): Keyword Args: + metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.. defaults to "cosine", must be one of ["cosine", "euclidean", "dotproduct", ] # noqa: E501 _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. @@ -264,8 +271,10 @@ def __init__(self, name, dimension, metric, host, spec, status, *args, **kwargs) Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + host (str): The URL address where the index is hosted.. [optional] # noqa: E501 """ + metric = kwargs.get('metric', "cosine") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -292,7 +301,6 @@ def __init__(self, name, dimension, metric, host, spec, status, *args, **kwargs) self.name = name self.dimension = dimension self.metric = metric - self.host = host self.spec = spec self.status = status for var_name, var_value in kwargs.items(): diff --git a/pinecone/core/client/model/index_model_spec.py b/pinecone/core/client/model/index_model_spec.py index 959de0066..3a98bec78 100644 --- a/pinecone/core/client/model/index_model_spec.py +++ b/pinecone/core/client/model/index_model_spec.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/index_model_status.py b/pinecone/core/client/model/index_model_status.py index 58b2e3e85..8e43659ca 100644 --- a/pinecone/core/client/model/index_model_status.py +++ b/pinecone/core/client/model/index_model_status.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -62,6 +63,7 @@ class IndexModelStatus(ModelNormal): 'SCALINGDOWN': "ScalingDown", 'SCALINGUPPODSIZE': "ScalingUpPodSize", 'SCALINGDOWNPODSIZE': "ScalingDownPodSize", + 'UPGRADING': "Upgrading", 'TERMINATING': "Terminating", 'READY': "Ready", }, diff --git a/pinecone/core/client/model/gcp_regions.py b/pinecone/core/client/model/list_item.py similarity index 72% rename from pinecone/core/client/model/gcp_regions.py rename to pinecone/core/client/model/list_item.py index e7713bd81..17d0dabcd 100644 --- a/pinecone/core/client/model/gcp_regions.py +++ b/pinecone/core/client/model/list_item.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class GcpRegions(ModelSimple): +class ListItem(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,6 +42,10 @@ class GcpRegions(ModelSimple): 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, @@ -51,14 +56,6 @@ class GcpRegions(ModelSimple): """ allowed_values = { - ('value',): { - 'US-WEST1': "us-west1", - 'US-WEST2': "us-west2", - 'EU-WEST4': "eu-west4", - 'NORTHAMERICA-NORTHEAST1': "northamerica-northeast1", - 'ASIA-NORTHEAST1': "asia-northeast1", - 'ASIA-SOUTHEAST1C': "asia-southeast1C", - }, } validations = { @@ -85,7 +82,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + 'id': (str,), # noqa: E501 } @cached_property @@ -93,32 +90,21 @@ def discriminator(): return None - attribute_map = {} + attribute_map = { + 'id': 'id', # noqa: E501 + } - read_only_vars = set() + read_only_vars = { + } - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) + _composed_schemas = {} + @classmethod @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """GcpRegions - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Regions available with the GCP cloud provider., must be one of ["us-west1", "us-west2", "eu-west4", "northamerica-northeast1", "asia-northeast1", "asia-southeast1C", ] # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListItem - a model defined in OpenAPI Keyword Args: - value (str): Regions available with the GCP cloud provider., must be one of ["us-west1", "us-west2", "eu-west4", "northamerica-northeast1", "asia-northeast1", "asia-southeast1C", ] # noqa: E501 _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. @@ -149,27 +135,17 @@ def __init__(self, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise PineconeApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + self = super(OpenApiModel, cls).__new__(cls) + if args: raise PineconeApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( @@ -186,29 +162,31 @@ def __init__(self, *args, **kwargs): self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise PineconeApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """GcpRegions - a model defined in OpenAPI + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self - Note that value can be passed either in args or in kwargs, but not in both. + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) - Args: - args[0] (str): Regions available with the GCP cloud provider., must be one of ["us-west1", "us-west2", "eu-west4", "northamerica-northeast1", "asia-northeast1", "asia-southeast1C", ] # noqa: E501 + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ListItem - a model defined in OpenAPI Keyword Args: - value (str): Regions available with the GCP cloud provider., must be one of ["us-west1", "us-west2", "eu-west4", "northamerica-northeast1", "asia-northeast1", "asia-southeast1C", ] # noqa: E501 _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. @@ -239,26 +217,12 @@ def _from_openapi_data(cls, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise PineconeApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -278,15 +242,15 @@ def _from_openapi_data(cls, *args, **kwargs): self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise PineconeApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - return self + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pinecone/core/client/model/aws_regions.py b/pinecone/core/client/model/list_response.py similarity index 75% rename from pinecone/core/client/model/aws_regions.py rename to pinecone/core/client/model/list_response.py index 09739bfea..e84226b4c 100644 --- a/pinecone/core/client/model/aws_regions.py +++ b/pinecone/core/client/model/list_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -29,8 +30,14 @@ from pinecone.core.client.exceptions import PineconeApiAttributeError +def lazy_import(): + from pinecone.core.client.model.list_item import ListItem + from pinecone.core.client.model.pagination import Pagination + globals()['ListItem'] = ListItem + globals()['Pagination'] = Pagination -class AwsRegions(ModelSimple): + +class ListResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,6 +48,10 @@ class AwsRegions(ModelSimple): 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, @@ -51,11 +62,6 @@ class AwsRegions(ModelSimple): """ allowed_values = { - ('value',): { - 'EAST-1': "us-east-1", - 'WEST-1': "us-west-1", - 'WEST-2': "us-west-2", - }, } validations = { @@ -67,6 +73,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -81,8 +88,11 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - 'value': (str,), + 'vectors': ([ListItem],), # noqa: E501 + 'pagination': (Pagination,), # noqa: E501 + 'namespace': (str,), # noqa: E501 } @cached_property @@ -90,32 +100,23 @@ def discriminator(): return None - attribute_map = {} + attribute_map = { + 'vectors': 'vectors', # noqa: E501 + 'pagination': 'pagination', # noqa: E501 + 'namespace': 'namespace', # noqa: E501 + } - read_only_vars = set() + read_only_vars = { + } - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) + _composed_schemas = {} + @classmethod @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """AwsRegions - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Regions available with the AWS cloud provider., must be one of ["us-east-1", "us-west-1", "us-west-2", ] # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListResponse - a model defined in OpenAPI Keyword Args: - value (str): Regions available with the AWS cloud provider., must be one of ["us-east-1", "us-west-1", "us-west-2", ] # noqa: E501 _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. @@ -146,27 +147,19 @@ def __init__(self, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + vectors ([ListItem]): [optional] # noqa: E501 + pagination (Pagination): [optional] # noqa: E501 + namespace (str): The namespace of the vectors.. [optional] # noqa: E501 """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise PineconeApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + self = super(OpenApiModel, cls).__new__(cls) + if args: raise PineconeApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( @@ -183,29 +176,31 @@ def __init__(self, *args, **kwargs): self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise PineconeApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """AwsRegions - a model defined in OpenAPI + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self - Note that value can be passed either in args or in kwargs, but not in both. + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) - Args: - args[0] (str): Regions available with the AWS cloud provider., must be one of ["us-east-1", "us-west-1", "us-west-2", ] # noqa: E501 + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ListResponse - a model defined in OpenAPI Keyword Args: - value (str): Regions available with the AWS cloud provider., must be one of ["us-east-1", "us-west-1", "us-west-2", ] # noqa: E501 _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. @@ -236,26 +231,14 @@ def _from_openapi_data(cls, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + vectors ([ListItem]): [optional] # noqa: E501 + pagination (Pagination): [optional] # noqa: E501 + namespace (str): The namespace of the vectors.. [optional] # noqa: E501 """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise PineconeApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -275,15 +258,15 @@ def _from_openapi_data(cls, *args, **kwargs): self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise PineconeApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - return self + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pinecone/core/client/model/namespace_summary.py b/pinecone/core/client/model/namespace_summary.py index 0ea3fd96b..c7f860797 100644 --- a/pinecone/core/client/model/namespace_summary.py +++ b/pinecone/core/client/model/namespace_summary.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/pagination.py b/pinecone/core/client/model/pagination.py new file mode 100644 index 000000000..ff57a8400 --- /dev/null +++ b/pinecone/core/client/model/pagination.py @@ -0,0 +1,256 @@ +""" + Pinecone Control Plane API + + Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: support@pinecone.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pinecone.core.client.model_utils import ( # noqa: F401 + PineconeApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from pinecone.core.client.exceptions import PineconeApiAttributeError + + + +class Pagination(ModelNormal): + """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. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + 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. + """ + return { + 'next': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'next': 'next', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Pagination - a model defined in OpenAPI + + 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,) + next (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Pagination - a model defined in OpenAPI + + 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,) + next (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pinecone/core/client/model/pod_spec.py b/pinecone/core/client/model/pod_spec.py index 8e63cbc8b..f1b338b0e 100644 --- a/pinecone/core/client/model/pod_spec.py +++ b/pinecone/core/client/model/pod_spec.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -137,7 +138,7 @@ def _from_openapi_data(cls, environment, *args, **kwargs): # noqa: E501 replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.. defaults to 1 # noqa: E501 shards (int): The number of shards. Shards split your data across multiple pods so you can fit more data into an index.. defaults to 1 # noqa: E501 pod_type (str): The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.. defaults to "p1.x1" # noqa: E501 - pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.. defaults to 1 # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.'. defaults to 1 # noqa: E501 _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. @@ -236,7 +237,7 @@ def __init__(self, environment, *args, **kwargs): # noqa: E501 replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.. defaults to 1 # noqa: E501 shards (int): The number of shards. Shards split your data across multiple pods so you can fit more data into an index.. defaults to 1 # noqa: E501 pod_type (str): The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.. defaults to "p1.x1" # noqa: E501 - pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.. defaults to 1 # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.'. defaults to 1 # noqa: E501 _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. diff --git a/pinecone/core/client/model/pod_spec_metadata_config.py b/pinecone/core/client/model/pod_spec_metadata_config.py index 8fe593d5d..2e63659fd 100644 --- a/pinecone/core/client/model/pod_spec_metadata_config.py +++ b/pinecone/core/client/model/pod_spec_metadata_config.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -134,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - indexed ([str]): By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.. [optional] # noqa: E501 + indexed ([str]): By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -216,7 +217,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - indexed ([str]): By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.. [optional] # noqa: E501 + indexed ([str]): By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/pinecone/core/client/model/protobuf_any.py b/pinecone/core/client/model/protobuf_any.py index c1bbf8c64..e35f81eb5 100644 --- a/pinecone/core/client/model/protobuf_any.py +++ b/pinecone/core/client/model/protobuf_any.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/protobuf_null_value.py b/pinecone/core/client/model/protobuf_null_value.py index f38ae2ca8..7b5b0f1da 100644 --- a/pinecone/core/client/model/protobuf_null_value.py +++ b/pinecone/core/client/model/protobuf_null_value.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/query_request.py b/pinecone/core/client/model/query_request.py index 0fe0779aa..1e2c6466a 100644 --- a/pinecone/core/client/model/query_request.py +++ b/pinecone/core/client/model/query_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/query_response.py b/pinecone/core/client/model/query_response.py index a81724e12..58a29ce3b 100644 --- a/pinecone/core/client/model/query_response.py +++ b/pinecone/core/client/model/query_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/query_vector.py b/pinecone/core/client/model/query_vector.py index 68784ec14..eed194e63 100644 --- a/pinecone/core/client/model/query_vector.py +++ b/pinecone/core/client/model/query_vector.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/rpc_status.py b/pinecone/core/client/model/rpc_status.py index ebcfb2c28..10f0b445b 100644 --- a/pinecone/core/client/model/rpc_status.py +++ b/pinecone/core/client/model/rpc_status.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/scored_vector.py b/pinecone/core/client/model/scored_vector.py index b8681f645..9f92e1a48 100644 --- a/pinecone/core/client/model/scored_vector.py +++ b/pinecone/core/client/model/scored_vector.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/serverless_spec.py b/pinecone/core/client/model/serverless_spec.py index 7f967c6e0..15137c602 100644 --- a/pinecone/core/client/model/serverless_spec.py +++ b/pinecone/core/client/model/serverless_spec.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ @@ -111,8 +112,8 @@ def _from_openapi_data(cls, cloud, region, *args, **kwargs): # noqa: E501 """ServerlessSpec - a model defined in OpenAPI Args: - cloud (str): The public cloud where you would like your index hosted - region (str): The region where you would like your index to be created. Different cloud providers have different regions available. See AwsRegions and GcpRegions for a list of available options. + cloud (str): The public cloud where you would like your index hosted. Serverless indexes can be hosted only in AWS at this time. + region (str): The region where you would like your index to be created. Serverless indexes can be created only in the us-west-2 region of AWS at this time. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -198,8 +199,8 @@ def __init__(self, cloud, region, *args, **kwargs): # noqa: E501 """ServerlessSpec - a model defined in OpenAPI Args: - cloud (str): The public cloud where you would like your index hosted - region (str): The region where you would like your index to be created. Different cloud providers have different regions available. See AwsRegions and GcpRegions for a list of available options. + cloud (str): The public cloud where you would like your index hosted. Serverless indexes can be hosted only in AWS at this time. + region (str): The region where you would like your index to be created. Serverless indexes can be created only in the us-west-2 region of AWS at this time. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/pinecone/core/client/model/single_query_results.py b/pinecone/core/client/model/single_query_results.py index 389af078c..b84b8ba8d 100644 --- a/pinecone/core/client/model/single_query_results.py +++ b/pinecone/core/client/model/single_query_results.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/sparse_values.py b/pinecone/core/client/model/sparse_values.py index 95bc4e945..735835500 100644 --- a/pinecone/core/client/model/sparse_values.py +++ b/pinecone/core/client/model/sparse_values.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/update_request.py b/pinecone/core/client/model/update_request.py index aebfd0c4b..fc94d0312 100644 --- a/pinecone/core/client/model/update_request.py +++ b/pinecone/core/client/model/update_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/upsert_request.py b/pinecone/core/client/model/upsert_request.py index 20d79830b..980f734c2 100644 --- a/pinecone/core/client/model/upsert_request.py +++ b/pinecone/core/client/model/upsert_request.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/upsert_response.py b/pinecone/core/client/model/upsert_response.py index 22b30a822..611ffb13c 100644 --- a/pinecone/core/client/model/upsert_response.py +++ b/pinecone/core/client/model/upsert_response.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/usage.py b/pinecone/core/client/model/usage.py index c38b88d25..9ba765469 100644 --- a/pinecone/core/client/model/usage.py +++ b/pinecone/core/client/model/usage.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model/vector.py b/pinecone/core/client/model/vector.py index 031506e5b..63fed80e6 100644 --- a/pinecone/core/client/model/vector.py +++ b/pinecone/core/client/model/vector.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/model_utils.py b/pinecone/core/client/model_utils.py index 308174e8e..a3572fbb9 100644 --- a/pinecone/core/client/model_utils.py +++ b/pinecone/core/client/model_utils.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/client/models/__init__.py b/pinecone/core/client/models/__init__.py index d15a24e8b..8e4aa36c5 100644 --- a/pinecone/core/client/models/__init__.py +++ b/pinecone/core/client/models/__init__.py @@ -9,7 +9,6 @@ # import sys # sys.setrecursionlimit(n) -from pinecone.core.client.model.aws_regions import AwsRegions from pinecone.core.client.model.collection_list import CollectionList from pinecone.core.client.model.collection_model import CollectionModel from pinecone.core.client.model.configure_index_request import ConfigureIndexRequest @@ -23,12 +22,14 @@ from pinecone.core.client.model.error_response import ErrorResponse from pinecone.core.client.model.error_response_error import ErrorResponseError from pinecone.core.client.model.fetch_response import FetchResponse -from pinecone.core.client.model.gcp_regions import GcpRegions from pinecone.core.client.model.index_list import IndexList from pinecone.core.client.model.index_model import IndexModel from pinecone.core.client.model.index_model_spec import IndexModelSpec from pinecone.core.client.model.index_model_status import IndexModelStatus +from pinecone.core.client.model.list_item import ListItem +from pinecone.core.client.model.list_response import ListResponse from pinecone.core.client.model.namespace_summary import NamespaceSummary +from pinecone.core.client.model.pagination import Pagination from pinecone.core.client.model.pod_spec import PodSpec from pinecone.core.client.model.pod_spec_metadata_config import PodSpecMetadataConfig from pinecone.core.client.model.protobuf_any import ProtobufAny diff --git a/pinecone/core/client/rest.py b/pinecone/core/client/rest.py index a7b8d432e..ed704eae5 100644 --- a/pinecone/core/client/rest.py +++ b/pinecone/core/client/rest.py @@ -1,9 +1,10 @@ """ - Pineonce.io Public API + Pinecone Control Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: v1 + Contact: support@pinecone.io Generated by: https://openapi-generator.tech """ diff --git a/pinecone/core/grpc/protos/vector_service_pb2.py b/pinecone/core/grpc/protos/vector_service_pb2.py index 2bd90fadf..73a068344 100644 --- a/pinecone/core/grpc/protos/vector_service_pb2.py +++ b/pinecone/core/grpc/protos/vector_service_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=b'\n\021io.pinecone.protoP\001Z/github.com/pinecone-io/new-go-pinecone/pinecone\222A\366\002\022K\n\014Pinecone API\";\n\017Pinecone.io Ops\022\023https://pinecone.io\032\023support@pinecone.io\0329{index_name}-{project_name}.svc.{environment}.pinecone.io*\001\0022\020application/json:\020application/jsonZx\nv\n\nApiKeyAuth\022h\010\002\022YAn API Key is required to call Pinecone APIs. Get yours at https://www.pinecone.io/start/\032\007Api-Key \002b\020\n\016\n\nApiKeyAuth\022\000r9\n\031More Pinecone.io API docs\022\034https://www.pinecone.io/docs', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x14vector_service.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"~\n\x0cSparseValues\x12\x35\n\x07indices\x18\x01 \x03(\rB$\x92\x41\x1eJ\x16[1, 312, 822, 14, 980]x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12\x37\n\x06values\x18\x02 \x03(\x02\x42\'\x92\x41!J\x19[0.1, 0.2, 0.3, 0.4, 0.5]x\xe8\x07\x80\x01\x01\xe0\x41\x02\"\xfd\x01\n\x06Vector\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12G\n\x06values\x18\x02 \x03(\x02\x42\x37\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\xe0\x41\x02\x12$\n\rsparse_values\x18\x04 \x01(\x0b\x32\r.SparseValues\x12V\n\x08metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\"\x93\x02\n\x0cScoredVector\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12\x18\n\x05score\x18\x02 \x01(\x02\x42\t\x92\x41\x06J\x04\x30.08\x12=\n\x06values\x18\x03 \x03(\x02\x42-\x92\x41*J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12V\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\"d\n\rUpsertRequest\x12&\n\x07vectors\x18\x01 \x03(\x0b\x32\x07.VectorB\x0c\x92\x41\x06x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"1\n\x0eUpsertResponse\x12\x1f\n\x0eupserted_count\x18\x01 \x01(\rB\x07\x92\x41\x04J\x02\x31\x30\"\xb6\x01\n\rDeleteRequest\x12(\n\x03ids\x18\x01 \x03(\tB\x1b\x92\x41\x18J\x10[\"id-0\", \"id-1\"]x\xe8\x07\x80\x01\x01\x12%\n\ndelete_all\x18\x02 \x01(\x08\x42\x11\x92\x41\x0e:\x05\x66\x61lseJ\x05\x66\x61lse\x12+\n\tnamespace\x18\x03 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12\'\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x10\n\x0e\x44\x65leteResponse\"h\n\x0c\x46\x65tchRequest\x12+\n\x03ids\x18\x01 \x03(\tB\x1e\x92\x41\x18J\x10[\"id-0\", \"id-1\"]x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\xe1\x01\n\rFetchResponse\x12,\n\x07vectors\x18\x01 \x03(\x0b\x32\x1b.FetchResponse.VectorsEntry\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12\x32\n\x05usage\x18\x03 \x01(\x0b\x32\x06.UsageB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x1a\x37\n\x0cVectorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x05value\x18\x02 \x01(\x0b\x32\x07.Vector:\x02\x38\x01\x42\x08\n\x06_usage\"\xd0\x02\n\x0bQueryVector\x12G\n\x06values\x18\x01 \x03(\x02\x42\x37\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\xe0\x41\x02\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12(\n\x05top_k\x18\x02 \x01(\rB\x19\x92\x41\x16J\x02\x31\x30Y\x00\x00\x00\x00\x00\x88\xc3@i\x00\x00\x00\x00\x00\x00\xf0?\x12+\n\tnamespace\x18\x03 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12{\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructBR\x92\x41OJM{\"genre\": {\"$in\": [\"comedy\", \"documentary\", \"drama\"]}, \"year\": {\"$eq\": 2019}}\"\xfa\x03\n\x0cQueryRequest\x12+\n\tnamespace\x18\x01 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12+\n\x05top_k\x18\x02 \x01(\rB\x1c\x92\x41\x16J\x02\x31\x30Y\x00\x00\x00\x00\x00\x88\xc3@i\x00\x00\x00\x00\x00\x00\xf0?\xe0\x41\x02\x12{\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructBR\x92\x41OJM{\"genre\": {\"$in\": [\"comedy\", \"documentary\", \"drama\"]}, \"year\": {\"$eq\": 2019}}\x12(\n\x0einclude_values\x18\x04 \x01(\x08\x42\x10\x92\x41\r:\x05\x66\x61lseJ\x04true\x12*\n\x10include_metadata\x18\x05 \x01(\x08\x42\x10\x92\x41\r:\x05\x66\x61lseJ\x04true\x12)\n\x07queries\x18\x06 \x03(\x0b\x32\x0c.QueryVectorB\n\x18\x01\x92\x41\x05x\n\x80\x01\x01\x12\x44\n\x06vector\x18\x07 \x03(\x02\x42\x34\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\x12$\n\rsparse_vector\x18\t \x01(\x0b\x32\r.SparseValues\x12&\n\x02id\x18\x08 \x01(\tB\x1a\x92\x41\x17J\x12\"example-vector-1\"x\x80\x04\"a\n\x12SingleQueryResults\x12\x1e\n\x07matches\x18\x01 \x03(\x0b\x32\r.ScoredVector\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\xaa\x01\n\rQueryResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x13.SingleQueryResultsB\x02\x18\x01\x12\x1e\n\x07matches\x18\x02 \x03(\x0b\x32\r.ScoredVector\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x32\n\x05usage\x18\x04 \x01(\x0b\x32\x06.UsageB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x42\x08\n\x06_usage\"G\n\x05Usage\x12/\n\nread_units\x18\x01 \x01(\rB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x42\r\n\x0b_read_units\"\xb2\x02\n\rUpdateRequest\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12\x44\n\x06values\x18\x02 \x03(\x02\x42\x34\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12Z\n\x0cset_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\x12+\n\tnamespace\x18\x04 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\x10\n\x0eUpdateResponse\"D\n\x19\x44\x65scribeIndexStatsRequest\x12\'\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"4\n\x10NamespaceSummary\x12 \n\x0cvector_count\x18\x01 \x01(\rB\n\x92\x41\x07J\x05\x35\x30\x30\x30\x30\"\x9a\x03\n\x1a\x44\x65scribeIndexStatsResponse\x12?\n\nnamespaces\x18\x01 \x03(\x0b\x32+.DescribeIndexStatsResponse.NamespacesEntry\x12\x1c\n\tdimension\x18\x02 \x01(\rB\t\x92\x41\x06J\x04\x31\x30\x32\x34\x12 \n\x0eindex_fullness\x18\x03 \x01(\x02\x42\x08\x92\x41\x05J\x03\x30.4\x12&\n\x12total_vector_count\x18\x04 \x01(\rB\n\x92\x41\x07J\x05\x38\x30\x30\x30\x30\x1a\x44\n\x0fNamespacesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.NamespaceSummary:\x02\x38\x01:\x8c\x01\x92\x41\x88\x01\x32\x85\x01{\"namespaces\": {\"\": {\"vectorCount\": 50000}, \"example-namespace-2\": {\"vectorCount\": 30000}}, \"dimension\": 1024, \"index_fullness\": 0.4}2\xbd\x05\n\rVectorService\x12\x63\n\x06Upsert\x12\x0e.UpsertRequest\x1a\x0f.UpsertResponse\"8\x82\xd3\xe4\x93\x02\x14\"\x0f/vectors/upsert:\x01*\x92\x41\x1b\n\x11Vector Operations*\x06upsert\x12v\n\x06\x44\x65lete\x12\x0e.DeleteRequest\x1a\x0f.DeleteResponse\"K\x82\xd3\xe4\x93\x02\'\"\x0f/vectors/delete:\x01*Z\x11*\x0f/vectors/delete\x92\x41\x1b\n\x11Vector Operations*\x06\x64\x65lete\x12[\n\x05\x46\x65tch\x12\r.FetchRequest\x1a\x0e.FetchResponse\"3\x82\xd3\xe4\x93\x02\x10\x12\x0e/vectors/fetch\x92\x41\x1a\n\x11Vector Operations*\x05\x66\x65tch\x12V\n\x05Query\x12\r.QueryRequest\x1a\x0e.QueryResponse\".\x82\xd3\xe4\x93\x02\x0b\"\x06/query:\x01*\x92\x41\x1a\n\x11Vector Operations*\x05query\x12\x63\n\x06Update\x12\x0e.UpdateRequest\x1a\x0f.UpdateResponse\"8\x82\xd3\xe4\x93\x02\x14\"\x0f/vectors/update:\x01*\x92\x41\x1b\n\x11Vector Operations*\x06update\x12\xb4\x01\n\x12\x44\x65scribeIndexStats\x12\x1a.DescribeIndexStatsRequest\x1a\x1b.DescribeIndexStatsResponse\"e\x82\xd3\xe4\x93\x02\x33\"\x15/describe_index_stats:\x01*Z\x17\x12\x15/describe_index_stats\x92\x41)\n\x11Vector Operations*\x14\x64\x65scribe_index_statsB\xc0\x03\n\x11io.pinecone.protoP\x01Z/github.com/pinecone-io/new-go-pinecone/pinecone\x92\x41\xf6\x02\x12K\n\x0cPinecone API\";\n\x0fPinecone.io Ops\x12\x13https://pinecone.io\x1a\x13support@pinecone.io\x1a\x39{index_name}-{project_name}.svc.{environment}.pinecone.io*\x01\x02\x32\x10\x61pplication/json:\x10\x61pplication/jsonZx\nv\n\nApiKeyAuth\x12h\x08\x02\x12YAn API Key is required to call Pinecone APIs. Get yours at https://www.pinecone.io/start/\x1a\x07\x41pi-Key \x02\x62\x10\n\x0e\n\nApiKeyAuth\x12\x00r9\n\x19More Pinecone.io API docs\x12\x1chttps://www.pinecone.io/docsb\x06proto3' + serialized_pb=b'\n\x14vector_service.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"~\n\x0cSparseValues\x12\x35\n\x07indices\x18\x01 \x03(\rB$\x92\x41\x1eJ\x16[1, 312, 822, 14, 980]x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12\x37\n\x06values\x18\x02 \x03(\x02\x42\'\x92\x41!J\x19[0.1, 0.2, 0.3, 0.4, 0.5]x\xe8\x07\x80\x01\x01\xe0\x41\x02\"\xfd\x01\n\x06Vector\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12G\n\x06values\x18\x02 \x03(\x02\x42\x37\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\xe0\x41\x02\x12$\n\rsparse_values\x18\x04 \x01(\x0b\x32\r.SparseValues\x12V\n\x08metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\"\x93\x02\n\x0cScoredVector\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12\x18\n\x05score\x18\x02 \x01(\x02\x42\t\x92\x41\x06J\x04\x30.08\x12=\n\x06values\x18\x03 \x03(\x02\x42-\x92\x41*J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12V\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\"d\n\rUpsertRequest\x12&\n\x07vectors\x18\x01 \x03(\x0b\x32\x07.VectorB\x0c\x92\x41\x06x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"1\n\x0eUpsertResponse\x12\x1f\n\x0eupserted_count\x18\x01 \x01(\rB\x07\x92\x41\x04J\x02\x31\x30\"\xb6\x01\n\rDeleteRequest\x12(\n\x03ids\x18\x01 \x03(\tB\x1b\x92\x41\x18J\x10[\"id-0\", \"id-1\"]x\xe8\x07\x80\x01\x01\x12%\n\ndelete_all\x18\x02 \x01(\x08\x42\x11\x92\x41\x0e:\x05\x66\x61lseJ\x05\x66\x61lse\x12+\n\tnamespace\x18\x03 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12\'\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x10\n\x0e\x44\x65leteResponse\"h\n\x0c\x46\x65tchRequest\x12+\n\x03ids\x18\x01 \x03(\tB\x1e\x92\x41\x18J\x10[\"id-0\", \"id-1\"]x\xe8\x07\x80\x01\x01\xe0\x41\x02\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\xe1\x01\n\rFetchResponse\x12,\n\x07vectors\x18\x01 \x03(\x0b\x32\x1b.FetchResponse.VectorsEntry\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12\x32\n\x05usage\x18\x03 \x01(\x0b\x32\x06.UsageB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x1a\x37\n\x0cVectorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x05value\x18\x02 \x01(\x0b\x32\x07.Vector:\x02\x38\x01\x42\x08\n\x06_usage\"\xf6\x01\n\x0bListRequest\x12,\n\x06prefix\x18\x01 \x01(\tB\x17\x92\x41\x14J\x0c\"document1#\"x\xe8\x07\x80\x01\x01H\x00\x88\x01\x01\x12 \n\x05limit\x18\x02 \x01(\rB\x0c\x92\x41\t:\x03\x31\x30\x30J\x02\x31\x32H\x01\x88\x01\x01\x12@\n\x10pagination_token\x18\x03 \x01(\tB!\x92\x41\x1eJ\x1cTm90aGluZyB0byBzZWUgaGVyZQo=H\x02\x88\x01\x01\x12+\n\tnamespace\x18\x04 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"B\t\n\x07_prefixB\x08\n\x06_limitB\x13\n\x11_pagination_token\"?\n\nPagination\x12\x31\n\x04next\x18\x01 \x01(\tB#\x92\x41 J\x1e\"Tm90aGluZyB0byBzZWUgaGVyZQo=\"\",\n\x08ListItem\x12 \n\x02id\x18\x01 \x01(\tB\x14\x92\x41\x11J\x0f\"document1#abb\"\"\xc5\x01\n\x0cListResponse\x12S\n\x07vectors\x18\x01 \x03(\x0b\x32\t.ListItemB7\x92\x41\x34J2[{\"id\": \"document1#abb\"}, {\"id\": \"document1#abc\"}]\x12$\n\npagination\x18\x02 \x01(\x0b\x32\x0b.PaginationH\x00\x88\x01\x01\x12+\n\tnamespace\x18\x03 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"B\r\n\x0b_pagination\"\xd0\x02\n\x0bQueryVector\x12G\n\x06values\x18\x01 \x03(\x02\x42\x37\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\xe0\x41\x02\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12(\n\x05top_k\x18\x02 \x01(\rB\x19\x92\x41\x16J\x02\x31\x30Y\x00\x00\x00\x00\x00\x88\xc3@i\x00\x00\x00\x00\x00\x00\xf0?\x12+\n\tnamespace\x18\x03 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12{\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructBR\x92\x41OJM{\"genre\": {\"$in\": [\"comedy\", \"documentary\", \"drama\"]}, \"year\": {\"$eq\": 2019}}\"\xfa\x03\n\x0cQueryRequest\x12+\n\tnamespace\x18\x01 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\x12+\n\x05top_k\x18\x02 \x01(\rB\x1c\x92\x41\x16J\x02\x31\x30Y\x00\x00\x00\x00\x00\x88\xc3@i\x00\x00\x00\x00\x00\x00\xf0?\xe0\x41\x02\x12{\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructBR\x92\x41OJM{\"genre\": {\"$in\": [\"comedy\", \"documentary\", \"drama\"]}, \"year\": {\"$eq\": 2019}}\x12(\n\x0einclude_values\x18\x04 \x01(\x08\x42\x10\x92\x41\r:\x05\x66\x61lseJ\x04true\x12*\n\x10include_metadata\x18\x05 \x01(\x08\x42\x10\x92\x41\r:\x05\x66\x61lseJ\x04true\x12)\n\x07queries\x18\x06 \x03(\x0b\x32\x0c.QueryVectorB\n\x18\x01\x92\x41\x05x\n\x80\x01\x01\x12\x44\n\x06vector\x18\x07 \x03(\x02\x42\x34\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\x12$\n\rsparse_vector\x18\t \x01(\x0b\x32\r.SparseValues\x12&\n\x02id\x18\x08 \x01(\tB\x1a\x92\x41\x17J\x12\"example-vector-1\"x\x80\x04\"a\n\x12SingleQueryResults\x12\x1e\n\x07matches\x18\x01 \x03(\x0b\x32\r.ScoredVector\x12+\n\tnamespace\x18\x02 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\xaa\x01\n\rQueryResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x13.SingleQueryResultsB\x02\x18\x01\x12\x1e\n\x07matches\x18\x02 \x03(\x0b\x32\r.ScoredVector\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x32\n\x05usage\x18\x04 \x01(\x0b\x32\x06.UsageB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x42\x08\n\x06_usage\"G\n\x05Usage\x12/\n\nread_units\x18\x01 \x01(\rB\x16\x92\x41\x13J\x11{\"read_units\": 5}H\x00\x88\x01\x01\x42\r\n\x0b_read_units\"\xb2\x02\n\rUpdateRequest\x12,\n\x02id\x18\x01 \x01(\tB \x92\x41\x1aJ\x12\"example-vector-1\"x\x80\x04\x80\x01\x01\xe0\x41\x02\x12\x44\n\x06values\x18\x02 \x03(\x02\x42\x34\x92\x41\x31J([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]x\xa0\x9c\x01\x80\x01\x01\x12$\n\rsparse_values\x18\x05 \x01(\x0b\x32\r.SparseValues\x12Z\n\x0cset_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB+\x92\x41(J&{\"genre\": \"documentary\", \"year\": 2019}\x12+\n\tnamespace\x18\x04 \x01(\tB\x18\x92\x41\x15J\x13\"example-namespace\"\"\x10\n\x0eUpdateResponse\"D\n\x19\x44\x65scribeIndexStatsRequest\x12\'\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"4\n\x10NamespaceSummary\x12 \n\x0cvector_count\x18\x01 \x01(\rB\n\x92\x41\x07J\x05\x35\x30\x30\x30\x30\"\x9a\x03\n\x1a\x44\x65scribeIndexStatsResponse\x12?\n\nnamespaces\x18\x01 \x03(\x0b\x32+.DescribeIndexStatsResponse.NamespacesEntry\x12\x1c\n\tdimension\x18\x02 \x01(\rB\t\x92\x41\x06J\x04\x31\x30\x32\x34\x12 \n\x0eindex_fullness\x18\x03 \x01(\x02\x42\x08\x92\x41\x05J\x03\x30.4\x12&\n\x12total_vector_count\x18\x04 \x01(\rB\n\x92\x41\x07J\x05\x38\x30\x30\x30\x30\x1a\x44\n\x0fNamespacesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.NamespaceSummary:\x02\x38\x01:\x8c\x01\x92\x41\x88\x01\x32\x85\x01{\"namespaces\": {\"\": {\"vectorCount\": 50000}, \"example-namespace-2\": {\"vectorCount\": 30000}}, \"dimension\": 1024, \"index_fullness\": 0.4}2\x95\x06\n\rVectorService\x12\x63\n\x06Upsert\x12\x0e.UpsertRequest\x1a\x0f.UpsertResponse\"8\x82\xd3\xe4\x93\x02\x14\"\x0f/vectors/upsert:\x01*\x92\x41\x1b\n\x11Vector Operations*\x06upsert\x12v\n\x06\x44\x65lete\x12\x0e.DeleteRequest\x1a\x0f.DeleteResponse\"K\x82\xd3\xe4\x93\x02\'\"\x0f/vectors/delete:\x01*Z\x11*\x0f/vectors/delete\x92\x41\x1b\n\x11Vector Operations*\x06\x64\x65lete\x12[\n\x05\x46\x65tch\x12\r.FetchRequest\x1a\x0e.FetchResponse\"3\x82\xd3\xe4\x93\x02\x10\x12\x0e/vectors/fetch\x92\x41\x1a\n\x11Vector Operations*\x05\x66\x65tch\x12V\n\x04List\x12\x0c.ListRequest\x1a\r.ListResponse\"1\x82\xd3\xe4\x93\x02\x0f\x12\r/vectors/list\x92\x41\x19\n\x11Vector Operations*\x04list\x12V\n\x05Query\x12\r.QueryRequest\x1a\x0e.QueryResponse\".\x82\xd3\xe4\x93\x02\x0b\"\x06/query:\x01*\x92\x41\x1a\n\x11Vector Operations*\x05query\x12\x63\n\x06Update\x12\x0e.UpdateRequest\x1a\x0f.UpdateResponse\"8\x82\xd3\xe4\x93\x02\x14\"\x0f/vectors/update:\x01*\x92\x41\x1b\n\x11Vector Operations*\x06update\x12\xb4\x01\n\x12\x44\x65scribeIndexStats\x12\x1a.DescribeIndexStatsRequest\x1a\x1b.DescribeIndexStatsResponse\"e\x82\xd3\xe4\x93\x02\x33\"\x15/describe_index_stats:\x01*Z\x17\x12\x15/describe_index_stats\x92\x41)\n\x11Vector Operations*\x14\x64\x65scribe_index_statsB\xc0\x03\n\x11io.pinecone.protoP\x01Z/github.com/pinecone-io/new-go-pinecone/pinecone\x92\x41\xf6\x02\x12K\n\x0cPinecone API\";\n\x0fPinecone.io Ops\x12\x13https://pinecone.io\x1a\x13support@pinecone.io\x1a\x39{index_name}-{project_name}.svc.{environment}.pinecone.io*\x01\x02\x32\x10\x61pplication/json:\x10\x61pplication/jsonZx\nv\n\nApiKeyAuth\x12h\x08\x02\x12YAn API Key is required to call Pinecone APIs. Get yours at https://www.pinecone.io/start/\x1a\x07\x41pi-Key \x02\x62\x10\n\x0e\n\nApiKeyAuth\x12\x00r9\n\x19More Pinecone.io API docs\x12\x1chttps://www.pinecone.io/docsb\x06proto3' , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,protoc__gen__openapiv2_dot_options_dot_annotations__pb2.DESCRIPTOR,]) @@ -459,6 +459,189 @@ ) +_LISTREQUEST = _descriptor.Descriptor( + name='ListRequest', + full_name='ListRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='ListRequest.prefix', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\024J\014\"document1#\"x\350\007\200\001\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='ListRequest.limit', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\t:\003100J\00212', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='pagination_token', full_name='ListRequest.pagination_token', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\036J\034Tm90aGluZyB0byBzZWUgaGVyZQo=', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='namespace', full_name='ListRequest.namespace', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\025J\023\"example-namespace\"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_prefix', full_name='ListRequest._prefix', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_limit', full_name='ListRequest._limit', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_pagination_token', full_name='ListRequest._pagination_token', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=1518, + serialized_end=1764, +) + + +_PAGINATION = _descriptor.Descriptor( + name='Pagination', + full_name='Pagination', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='next', full_name='Pagination.next', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A J\036\"Tm90aGluZyB0byBzZWUgaGVyZQo=\"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1766, + serialized_end=1829, +) + + +_LISTITEM = _descriptor.Descriptor( + name='ListItem', + full_name='ListItem', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='ListItem.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\021J\017\"document1#abb\"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1831, + serialized_end=1875, +) + + +_LISTRESPONSE = _descriptor.Descriptor( + name='ListResponse', + full_name='ListResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='vectors', full_name='ListResponse.vectors', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A4J2[{\"id\": \"document1#abb\"}, {\"id\": \"document1#abc\"}]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='pagination', full_name='ListResponse.pagination', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='namespace', full_name='ListResponse.namespace', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\222A\025J\023\"example-namespace\"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_pagination', full_name='ListResponse._pagination', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=1878, + serialized_end=2075, +) + + _QUERYVECTOR = _descriptor.Descriptor( name='QueryVector', full_name='QueryVector', @@ -514,8 +697,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1518, - serialized_end=1854, + serialized_start=2078, + serialized_end=2414, ) @@ -602,8 +785,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1857, - serialized_end=2363, + serialized_start=2417, + serialized_end=2923, ) @@ -641,8 +824,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2365, - serialized_end=2462, + serialized_start=2925, + serialized_end=3022, ) @@ -699,8 +882,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2465, - serialized_end=2635, + serialized_start=3025, + serialized_end=3195, ) @@ -736,8 +919,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2637, - serialized_end=2708, + serialized_start=3197, + serialized_end=3268, ) @@ -796,8 +979,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2711, - serialized_end=3017, + serialized_start=3271, + serialized_end=3577, ) @@ -821,8 +1004,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3019, - serialized_end=3035, + serialized_start=3579, + serialized_end=3595, ) @@ -853,8 +1036,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3037, - serialized_end=3105, + serialized_start=3597, + serialized_end=3665, ) @@ -885,8 +1068,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3107, - serialized_end=3159, + serialized_start=3667, + serialized_end=3719, ) @@ -924,8 +1107,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3361, - serialized_end=3429, + serialized_start=3921, + serialized_end=3989, ) _DESCRIBEINDEXSTATSRESPONSE = _descriptor.Descriptor( @@ -976,8 +1159,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3162, - serialized_end=3572, + serialized_start=3722, + serialized_end=4132, ) _VECTOR.fields_by_name['sparse_values'].message_type = _SPARSEVALUES @@ -993,6 +1176,20 @@ _FETCHRESPONSE.oneofs_by_name['_usage'].fields.append( _FETCHRESPONSE.fields_by_name['usage']) _FETCHRESPONSE.fields_by_name['usage'].containing_oneof = _FETCHRESPONSE.oneofs_by_name['_usage'] +_LISTREQUEST.oneofs_by_name['_prefix'].fields.append( + _LISTREQUEST.fields_by_name['prefix']) +_LISTREQUEST.fields_by_name['prefix'].containing_oneof = _LISTREQUEST.oneofs_by_name['_prefix'] +_LISTREQUEST.oneofs_by_name['_limit'].fields.append( + _LISTREQUEST.fields_by_name['limit']) +_LISTREQUEST.fields_by_name['limit'].containing_oneof = _LISTREQUEST.oneofs_by_name['_limit'] +_LISTREQUEST.oneofs_by_name['_pagination_token'].fields.append( + _LISTREQUEST.fields_by_name['pagination_token']) +_LISTREQUEST.fields_by_name['pagination_token'].containing_oneof = _LISTREQUEST.oneofs_by_name['_pagination_token'] +_LISTRESPONSE.fields_by_name['vectors'].message_type = _LISTITEM +_LISTRESPONSE.fields_by_name['pagination'].message_type = _PAGINATION +_LISTRESPONSE.oneofs_by_name['_pagination'].fields.append( + _LISTRESPONSE.fields_by_name['pagination']) +_LISTRESPONSE.fields_by_name['pagination'].containing_oneof = _LISTRESPONSE.oneofs_by_name['_pagination'] _QUERYVECTOR.fields_by_name['sparse_values'].message_type = _SPARSEVALUES _QUERYVECTOR.fields_by_name['filter'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _QUERYREQUEST.fields_by_name['filter'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT @@ -1023,6 +1220,10 @@ DESCRIPTOR.message_types_by_name['DeleteResponse'] = _DELETERESPONSE DESCRIPTOR.message_types_by_name['FetchRequest'] = _FETCHREQUEST DESCRIPTOR.message_types_by_name['FetchResponse'] = _FETCHRESPONSE +DESCRIPTOR.message_types_by_name['ListRequest'] = _LISTREQUEST +DESCRIPTOR.message_types_by_name['Pagination'] = _PAGINATION +DESCRIPTOR.message_types_by_name['ListItem'] = _LISTITEM +DESCRIPTOR.message_types_by_name['ListResponse'] = _LISTRESPONSE DESCRIPTOR.message_types_by_name['QueryVector'] = _QUERYVECTOR DESCRIPTOR.message_types_by_name['QueryRequest'] = _QUERYREQUEST DESCRIPTOR.message_types_by_name['SingleQueryResults'] = _SINGLEQUERYRESULTS @@ -1106,6 +1307,34 @@ _sym_db.RegisterMessage(FetchResponse) _sym_db.RegisterMessage(FetchResponse.VectorsEntry) +ListRequest = _reflection.GeneratedProtocolMessageType('ListRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTREQUEST, + '__module__' : 'vector_service_pb2' + # @@protoc_insertion_point(class_scope:ListRequest) + }) +_sym_db.RegisterMessage(ListRequest) + +Pagination = _reflection.GeneratedProtocolMessageType('Pagination', (_message.Message,), { + 'DESCRIPTOR' : _PAGINATION, + '__module__' : 'vector_service_pb2' + # @@protoc_insertion_point(class_scope:Pagination) + }) +_sym_db.RegisterMessage(Pagination) + +ListItem = _reflection.GeneratedProtocolMessageType('ListItem', (_message.Message,), { + 'DESCRIPTOR' : _LISTITEM, + '__module__' : 'vector_service_pb2' + # @@protoc_insertion_point(class_scope:ListItem) + }) +_sym_db.RegisterMessage(ListItem) + +ListResponse = _reflection.GeneratedProtocolMessageType('ListResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTRESPONSE, + '__module__' : 'vector_service_pb2' + # @@protoc_insertion_point(class_scope:ListResponse) + }) +_sym_db.RegisterMessage(ListResponse) + QueryVector = _reflection.GeneratedProtocolMessageType('QueryVector', (_message.Message,), { 'DESCRIPTOR' : _QUERYVECTOR, '__module__' : 'vector_service_pb2' @@ -1206,6 +1435,14 @@ _FETCHRESPONSE_VECTORSENTRY._options = None _FETCHRESPONSE.fields_by_name['namespace']._options = None _FETCHRESPONSE.fields_by_name['usage']._options = None +_LISTREQUEST.fields_by_name['prefix']._options = None +_LISTREQUEST.fields_by_name['limit']._options = None +_LISTREQUEST.fields_by_name['pagination_token']._options = None +_LISTREQUEST.fields_by_name['namespace']._options = None +_PAGINATION.fields_by_name['next']._options = None +_LISTITEM.fields_by_name['id']._options = None +_LISTRESPONSE.fields_by_name['vectors']._options = None +_LISTRESPONSE.fields_by_name['namespace']._options = None _QUERYVECTOR.fields_by_name['values']._options = None _QUERYVECTOR.fields_by_name['top_k']._options = None _QUERYVECTOR.fields_by_name['namespace']._options = None @@ -1240,8 +1477,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=3575, - serialized_end=4276, + serialized_start=4135, + serialized_end=4924, methods=[ _descriptor.MethodDescriptor( name='Upsert', @@ -1273,10 +1510,20 @@ serialized_options=b'\202\323\344\223\002\020\022\016/vectors/fetch\222A\032\n\021Vector Operations*\005fetch', create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='List', + full_name='VectorService.List', + index=3, + containing_service=None, + input_type=_LISTREQUEST, + output_type=_LISTRESPONSE, + serialized_options=b'\202\323\344\223\002\017\022\r/vectors/list\222A\031\n\021Vector Operations*\004list', + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='Query', full_name='VectorService.Query', - index=3, + index=4, containing_service=None, input_type=_QUERYREQUEST, output_type=_QUERYRESPONSE, @@ -1286,7 +1533,7 @@ _descriptor.MethodDescriptor( name='Update', full_name='VectorService.Update', - index=4, + index=5, containing_service=None, input_type=_UPDATEREQUEST, output_type=_UPDATERESPONSE, @@ -1296,7 +1543,7 @@ _descriptor.MethodDescriptor( name='DescribeIndexStats', full_name='VectorService.DescribeIndexStats', - index=5, + index=6, containing_service=None, input_type=_DESCRIBEINDEXSTATSREQUEST, output_type=_DESCRIBEINDEXSTATSRESPONSE, diff --git a/pinecone/core/grpc/protos/vector_service_pb2.pyi b/pinecone/core/grpc/protos/vector_service_pb2.pyi index bbbae21e3..44810730b 100644 --- a/pinecone/core/grpc/protos/vector_service_pb2.pyi +++ b/pinecone/core/grpc/protos/vector_service_pb2.pyi @@ -26,6 +26,7 @@ from typing import ( Mapping as typing___Mapping, Optional as typing___Optional, Text as typing___Text, + overload as typing___overload, ) from typing_extensions import ( @@ -203,6 +204,73 @@ class FetchResponse(google___protobuf___message___Message): def WhichOneof(self, oneof_group: typing_extensions___Literal[u"_usage",b"_usage"]) -> typing_extensions___Literal["usage"]: ... type___FetchResponse = FetchResponse +class ListRequest(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + prefix: typing___Text = ... + limit: builtin___int = ... + pagination_token: typing___Text = ... + namespace: typing___Text = ... + + def __init__(self, + *, + prefix : typing___Optional[typing___Text] = None, + limit : typing___Optional[builtin___int] = None, + pagination_token : typing___Optional[typing___Text] = None, + namespace : typing___Optional[typing___Text] = None, + ) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"_limit",b"_limit",u"_pagination_token",b"_pagination_token",u"_prefix",b"_prefix",u"limit",b"limit",u"pagination_token",b"pagination_token",u"prefix",b"prefix"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"_limit",b"_limit",u"_pagination_token",b"_pagination_token",u"_prefix",b"_prefix",u"limit",b"limit",u"namespace",b"namespace",u"pagination_token",b"pagination_token",u"prefix",b"prefix"]) -> None: ... + @typing___overload + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"_limit",b"_limit"]) -> typing_extensions___Literal["limit"]: ... + @typing___overload + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"_pagination_token",b"_pagination_token"]) -> typing_extensions___Literal["pagination_token"]: ... + @typing___overload + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"_prefix",b"_prefix"]) -> typing_extensions___Literal["prefix"]: ... +type___ListRequest = ListRequest + +class Pagination(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + next: typing___Text = ... + + def __init__(self, + *, + next : typing___Optional[typing___Text] = None, + ) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"next",b"next"]) -> None: ... +type___Pagination = Pagination + +class ListItem(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + id: typing___Text = ... + + def __init__(self, + *, + id : typing___Optional[typing___Text] = None, + ) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"id",b"id"]) -> None: ... +type___ListItem = ListItem + +class ListResponse(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + namespace: typing___Text = ... + + @property + def vectors(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___ListItem]: ... + + @property + def pagination(self) -> type___Pagination: ... + + def __init__(self, + *, + vectors : typing___Optional[typing___Iterable[type___ListItem]] = None, + pagination : typing___Optional[type___Pagination] = None, + namespace : typing___Optional[typing___Text] = None, + ) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"_pagination",b"_pagination",u"pagination",b"pagination"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"_pagination",b"_pagination",u"namespace",b"namespace",u"pagination",b"pagination",u"vectors",b"vectors"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"_pagination",b"_pagination"]) -> typing_extensions___Literal["pagination"]: ... +type___ListResponse = ListResponse + class QueryVector(google___protobuf___message___Message): DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... values: google___protobuf___internal___containers___RepeatedScalarFieldContainer[builtin___float] = ... diff --git a/pinecone/core/grpc/protos/vector_service_pb2_grpc.py b/pinecone/core/grpc/protos/vector_service_pb2_grpc.py index 9688e5aed..3eaea4617 100644 --- a/pinecone/core/grpc/protos/vector_service_pb2_grpc.py +++ b/pinecone/core/grpc/protos/vector_service_pb2_grpc.py @@ -30,6 +30,11 @@ def __init__(self, channel): request_serializer=vector__service__pb2.FetchRequest.SerializeToString, response_deserializer=vector__service__pb2.FetchResponse.FromString, ) + self.List = channel.unary_unary( + '/VectorService/List', + request_serializer=vector__service__pb2.ListRequest.SerializeToString, + response_deserializer=vector__service__pb2.ListResponse.FromString, + ) self.Query = channel.unary_unary( '/VectorService/Query', request_serializer=vector__service__pb2.QueryRequest.SerializeToString, @@ -82,6 +87,22 @@ def Fetch(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def List(self, request, context): + """List + + The `List` operations lists the IDs of vectors in a single namespace. + An optional prefix can be passed to limit the listing to those ids that start + with the given prefix. + Ids are returned in sorted order (bitwise/"C" collation). + A maximum of 100 ids are returned at a time. + A pagination token is also returned to allow the client to list the next 100. + The absence of the pagination token indicates that there are no more ids that + match the given parameters. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Query(self, request, context): """Query @@ -135,6 +156,11 @@ def add_VectorServiceServicer_to_server(servicer, server): request_deserializer=vector__service__pb2.FetchRequest.FromString, response_serializer=vector__service__pb2.FetchResponse.SerializeToString, ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=vector__service__pb2.ListRequest.FromString, + response_serializer=vector__service__pb2.ListResponse.SerializeToString, + ), 'Query': grpc.unary_unary_rpc_method_handler( servicer.Query, request_deserializer=vector__service__pb2.QueryRequest.FromString, @@ -213,6 +239,23 @@ def Fetch(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/VectorService/List', + vector__service__pb2.ListRequest.SerializeToString, + vector__service__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Query(request, target, From c9414956b9211b0603378f63de94164dcd9a1bc5 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Fri, 9 Feb 2024 12:27:12 -0500 Subject: [PATCH 2/2] Fix tests --- .../control/serverless/test_create_index_api_errors.py | 2 +- tests/unit/models/test_collection_list.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/control/serverless/test_create_index_api_errors.py b/tests/integration/control/serverless/test_create_index_api_errors.py index 89ae97946..32bde3c4c 100644 --- a/tests/integration/control/serverless/test_create_index_api_errors.py +++ b/tests/integration/control/serverless/test_create_index_api_errors.py @@ -3,7 +3,7 @@ class TestCreateIndexApiErrorCases: def test_create_index_with_invalid_name(self, client, create_sl_index_params): - create_sl_index_params['name'] = '-invalid-name' + create_sl_index_params['name'] = 'Invalid-name' with pytest.raises(PineconeApiException): client.create_index(**create_sl_index_params) diff --git a/tests/unit/models/test_collection_list.py b/tests/unit/models/test_collection_list.py index fea78f2b4..8c34d3680 100644 --- a/tests/unit/models/test_collection_list.py +++ b/tests/unit/models/test_collection_list.py @@ -6,8 +6,8 @@ def collection_list_response(): return OpenApiCollectionList( collections=[ - CollectionModel(name='collection1', size=10000, status='Ready', dimension=1536, record_count=1000), - CollectionModel(name='collection2', size=20000, status='Ready', dimension=256, record_count=2000), + CollectionModel(name='collection1', size=10000, status='Ready', dimension=1536, record_count=1000, environment='us-west1-gcp'), + CollectionModel(name='collection2', size=20000, status='Ready', dimension=256, record_count=2000, environment='us-west1-gcp'), ], )