Skip to content

Commit 886f932

Browse files
authored
Update generated openapi code (#309)
## Problem We need to pull in the latest updates to the spec in our generated code. ## Solution Regenerate from new spec. The diff is large because some comment strings got updated that touch every file, but the main change is the addition of code for the new list endpoint. ## Type of Change - [x] New feature (non-breaking change which adds functionality)
1 parent 2c887bb commit 886f932

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1132
-373
lines changed

pinecone/core/client/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# flake8: noqa
22

33
"""
4-
Pineonce.io Public API
4+
Pinecone Control Plane API
55
66
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: v1
9+
910
Generated by: https://openapi-generator.tech
1011
"""
1112

pinecone/core/client/api/manage_indexes_api.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
Pineonce.io Public API
2+
Pinecone Control Plane API
33
44
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
55
6-
The version of the OpenAPI document: 1.0
6+
The version of the OpenAPI document: v1
7+
78
Generated by: https://openapi-generator.tech
89
"""
910

@@ -49,17 +50,17 @@ def __configure_index(
4950
configure_index_request,
5051
**kwargs
5152
):
52-
"""configure_index # noqa: E501
53+
"""Configure an index # noqa: E501
5354
54-
This operation specifies the pod type and number of replicas for an index. # noqa: E501
55+
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
5556
This method makes a synchronous HTTP request by default. To make an
5657
asynchronous HTTP request, please pass async_req=True
5758
5859
>>> thread = api.configure_index(index_name, configure_index_request, async_req=True)
5960
>>> result = thread.get()
6061
6162
Args:
62-
index_name (str): The name of the index to configure
63+
index_name (str): The name of the index to configure.
6364
configure_index_request (ConfigureIndexRequest): The desired pod type and replica configuration for the index.
6465
6566
Keyword Args:
@@ -183,9 +184,9 @@ def __create_collection(
183184
create_collection_request,
184185
**kwargs
185186
):
186-
"""create_collection # noqa: E501
187+
"""Create a collection # noqa: E501
187188
188-
This operation creates a Pinecone collection. # noqa: E501
189+
This operation creates a Pinecone collection. Serverless and starter indexes do not support collections. # noqa: E501
189190
This method makes a synchronous HTTP request by default. To make an
190191
asynchronous HTTP request, please pass async_req=True
191192
@@ -308,7 +309,7 @@ def __create_index(
308309
create_index_request,
309310
**kwargs
310311
):
311-
"""create_index # noqa: E501
312+
"""Create an index # noqa: E501
312313
313314
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
314315
This method makes a synchronous HTTP request by default. To make an
@@ -433,17 +434,17 @@ def __delete_collection(
433434
collection_name,
434435
**kwargs
435436
):
436-
"""delete_collection # noqa: E501
437+
"""Delete a collection # noqa: E501
437438
438-
This operation deletes an existing collection. # noqa: E501
439+
This operation deletes an existing collection. Serverless and starter indexes do not support collections. # noqa: E501
439440
This method makes a synchronous HTTP request by default. To make an
440441
asynchronous HTTP request, please pass async_req=True
441442
442443
>>> thread = api.delete_collection(collection_name, async_req=True)
443444
>>> result = thread.get()
444445
445446
Args:
446-
collection_name (str): The name of the collection
447+
collection_name (str): The name of the collection.
447448
448449
Keyword Args:
449450
_return_http_data_only (bool): response data without head status
@@ -558,7 +559,7 @@ def __delete_index(
558559
index_name,
559560
**kwargs
560561
):
561-
"""delete_index # noqa: E501
562+
"""Delete an index # noqa: E501
562563
563564
This operation deletes an existing index. # noqa: E501
564565
This method makes a synchronous HTTP request by default. To make an
@@ -568,7 +569,7 @@ def __delete_index(
568569
>>> result = thread.get()
569570
570571
Args:
571-
index_name (str): The name of the index to delete
572+
index_name (str): The name of the index to delete.
572573
573574
Keyword Args:
574575
_return_http_data_only (bool): response data without head status
@@ -682,17 +683,17 @@ def __describe_collection(
682683
collection_name,
683684
**kwargs
684685
):
685-
"""describe_collection # noqa: E501
686+
"""Describe a collection # noqa: E501
686687
687-
This operation gets a description of a collection. # noqa: E501
688+
This operation gets a description of a collection. Serverless and starter indexes do not support collections. # noqa: E501
688689
This method makes a synchronous HTTP request by default. To make an
689690
asynchronous HTTP request, please pass async_req=True
690691
691692
>>> thread = api.describe_collection(collection_name, async_req=True)
692693
>>> result = thread.get()
693694
694695
Args:
695-
collection_name (str): The name of the collection to be described
696+
collection_name (str): The name of the collection to be described.
696697
697698
Keyword Args:
698699
_return_http_data_only (bool): response data without head status
@@ -806,7 +807,7 @@ def __describe_index(
806807
index_name,
807808
**kwargs
808809
):
809-
"""describe_index # noqa: E501
810+
"""Describe an index # noqa: E501
810811
811812
Get a description of an index. # noqa: E501
812813
This method makes a synchronous HTTP request by default. To make an
@@ -816,7 +817,7 @@ def __describe_index(
816817
>>> result = thread.get()
817818
818819
Args:
819-
index_name (str): The name of the index to be described
820+
index_name (str): The name of the index to be described.
820821
821822
Keyword Args:
822823
_return_http_data_only (bool): response data without head status
@@ -929,9 +930,9 @@ def __list_collections(
929930
self,
930931
**kwargs
931932
):
932-
"""list_collections # noqa: E501
933+
"""List collections # noqa: E501
933934
934-
This operation returns a list of your Pinecone collections. # noqa: E501
935+
This operation returns a list of your Pinecone collections. Serverless and starter indexes do not support collections. # noqa: E501
935936
This method makes a synchronous HTTP request by default. To make an
936937
asynchronous HTTP request, please pass async_req=True
937938
@@ -1041,9 +1042,9 @@ def __list_indexes(
10411042
self,
10421043
**kwargs
10431044
):
1044-
"""list_indexes # noqa: E501
1045+
"""List indexes # noqa: E501
10451046
1046-
This operation returns a list of your Pinecone indexes. # noqa: E501
1047+
This operation returns a list of all indexes in a project. # noqa: E501
10471048
This method makes a synchronous HTTP request by default. To make an
10481049
asynchronous HTTP request, please pass async_req=True
10491050

pinecone/core/client/api/vector_operations_api.py

Lines changed: 135 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
Pineonce.io Public API
2+
Pinecone Control Plane API
33
44
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
55
6-
The version of the OpenAPI document: 1.0
6+
The version of the OpenAPI document: v1
7+
78
Generated by: https://openapi-generator.tech
89
"""
910

@@ -25,6 +26,7 @@
2526
from pinecone.core.client.model.describe_index_stats_request import DescribeIndexStatsRequest
2627
from pinecone.core.client.model.describe_index_stats_response import DescribeIndexStatsResponse
2728
from pinecone.core.client.model.fetch_response import FetchResponse
29+
from pinecone.core.client.model.list_response import ListResponse
2830
from pinecone.core.client.model.query_request import QueryRequest
2931
from pinecone.core.client.model.query_response import QueryResponse
3032
from pinecone.core.client.model.rpc_status import RpcStatus
@@ -644,6 +646,137 @@ def __fetch(
644646
callable=__fetch
645647
)
646648

649+
def __list(
650+
self,
651+
**kwargs
652+
):
653+
"""List # noqa: E501
654+
655+
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
656+
This method makes a synchronous HTTP request by default. To make an
657+
asynchronous HTTP request, please pass async_req=True
658+
659+
>>> thread = api.list(async_req=True)
660+
>>> result = thread.get()
661+
662+
663+
Keyword Args:
664+
prefix (str): The vector IDs to fetch. Does not accept values containing spaces.. [optional]
665+
limit (int): Max number of ids to return.. [optional]
666+
pagination_token (str): Pagination token to continue a previous listing operation.. [optional]
667+
namespace (str): [optional]
668+
_return_http_data_only (bool): response data without head status
669+
code and headers. Default is True.
670+
_preload_content (bool): if False, the urllib3.HTTPResponse object
671+
will be returned without reading/decoding response data.
672+
Default is True.
673+
_request_timeout (int/float/tuple): timeout setting for this request. If
674+
one number provided, it will be total request timeout. It can also
675+
be a pair (tuple) of (connection, read) timeouts.
676+
Default is None.
677+
_check_input_type (bool): specifies if type checking
678+
should be done one the data sent to the server.
679+
Default is True.
680+
_check_return_type (bool): specifies if type checking
681+
should be done one the data received from the server.
682+
Default is True.
683+
_host_index (int/None): specifies the index of the server
684+
that we want to use.
685+
Default is read from the configuration.
686+
async_req (bool): execute request asynchronously
687+
688+
Returns:
689+
ListResponse
690+
If the method is called asynchronously, returns the request
691+
thread.
692+
"""
693+
kwargs['async_req'] = kwargs.get(
694+
'async_req', False
695+
)
696+
kwargs['_return_http_data_only'] = kwargs.get(
697+
'_return_http_data_only', True
698+
)
699+
kwargs['_preload_content'] = kwargs.get(
700+
'_preload_content', True
701+
)
702+
kwargs['_request_timeout'] = kwargs.get(
703+
'_request_timeout', None
704+
)
705+
kwargs['_check_input_type'] = kwargs.get(
706+
'_check_input_type', True
707+
)
708+
kwargs['_check_return_type'] = kwargs.get(
709+
'_check_return_type', True
710+
)
711+
kwargs['_host_index'] = kwargs.get('_host_index')
712+
return self.call_with_http_info(**kwargs)
713+
714+
self.list = _Endpoint(
715+
settings={
716+
'response_type': (ListResponse,),
717+
'auth': [
718+
'ApiKeyAuth'
719+
],
720+
'endpoint_path': '/vectors/list',
721+
'operation_id': 'list',
722+
'http_method': 'GET',
723+
'servers': None,
724+
},
725+
params_map={
726+
'all': [
727+
'prefix',
728+
'limit',
729+
'pagination_token',
730+
'namespace',
731+
],
732+
'required': [],
733+
'nullable': [
734+
],
735+
'enum': [
736+
],
737+
'validation': [
738+
]
739+
},
740+
root_map={
741+
'validations': {
742+
},
743+
'allowed_values': {
744+
},
745+
'openapi_types': {
746+
'prefix':
747+
(str,),
748+
'limit':
749+
(int,),
750+
'pagination_token':
751+
(str,),
752+
'namespace':
753+
(str,),
754+
},
755+
'attribute_map': {
756+
'prefix': 'prefix',
757+
'limit': 'limit',
758+
'pagination_token': 'paginationToken',
759+
'namespace': 'namespace',
760+
},
761+
'location_map': {
762+
'prefix': 'query',
763+
'limit': 'query',
764+
'pagination_token': 'query',
765+
'namespace': 'query',
766+
},
767+
'collection_format_map': {
768+
}
769+
},
770+
headers_map={
771+
'accept': [
772+
'application/json'
773+
],
774+
'content_type': [],
775+
},
776+
api_client=api_client,
777+
callable=__list
778+
)
779+
647780
def __query(
648781
self,
649782
query_request,

pinecone/core/client/api_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
Pineonce.io Public API
2+
Pinecone Control Plane API
33
44
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
55
6-
The version of the OpenAPI document: 1.0
6+
The version of the OpenAPI document: v1
7+
78
Generated by: https://openapi-generator.tech
89
"""
910

pinecone/core/client/configuration.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
Pineonce.io Public API
2+
Pinecone Control Plane API
33
44
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
55
6-
The version of the OpenAPI document: 1.0
6+
The version of the OpenAPI document: v1
7+
78
Generated by: https://openapi-generator.tech
89
"""
910

@@ -405,7 +406,7 @@ def to_debug_report(self):
405406
return "Python SDK Debug Report:\n"\
406407
"OS: {env}\n"\
407408
"Python Version: {pyversion}\n"\
408-
"Version of the API: 1.0\n"\
409+
"Version of the API: v1\n"\
409410
"SDK Package Version: 1.0.0".\
410411
format(env=sys.platform, pyversion=sys.version)
411412

@@ -417,7 +418,7 @@ def get_host_settings(self):
417418
return [
418419
{
419420
'url': "https://api.pinecone.io",
420-
'description': "No description provided",
421+
'description': "Production API endpoints; unversioned legacy.",
421422
}
422423
]
423424

pinecone/core/client/exceptions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
Pineonce.io Public API
2+
Pinecone Control Plane API
33
44
Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501
55
6-
The version of the OpenAPI document: 1.0
6+
The version of the OpenAPI document: v1
7+
78
Generated by: https://openapi-generator.tech
89
"""
910

0 commit comments

Comments
 (0)