Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pinecone/core/client/api/index_operations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __configure_index(
):
"""configure_index # noqa: E501

Configure index to change pod type and number of replicas. # noqa: E501
This operation specifies the pod type and number of replicas for an index. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

Expand All @@ -63,7 +63,7 @@ def __configure_index(
index_name (str): The name of the index

Keyword Args:
patch_request (PatchRequest): The desired configuration changes for the index.. [optional]
patch_request (PatchRequest): The desired pod type and replica configuration for the index.. [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
Expand Down
4 changes: 2 additions & 2 deletions pinecone/core/client/api/vector_operations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def __describe_index_stats(
):
"""DescribeIndexStats # noqa: E501

The `DescribeIndexStats` operation returns statistics about the index's contents. For example: The vector count per namespace and the number of dimensions. # noqa: E501
The `DescribeIndexStats` operation returns statistics about the index's contents, including the vector count per namespace, the number of dimensions, and the index fullness. The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

Expand Down Expand Up @@ -422,7 +422,7 @@ def __describe_index_stats1(
):
"""DescribeIndexStats # noqa: E501

The `DescribeIndexStats` operation returns statistics about the index's contents. For example: The vector count per namespace and the number of dimensions. # noqa: E501
The `DescribeIndexStats` operation returns statistics about the index's contents, including the vector count per namespace, the number of dimensions, and the index fullness. The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

Expand Down
4 changes: 2 additions & 2 deletions pinecone/core/client/model/create_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _from_openapi_data(cls, name, dimension, *args, **kwargs): # noqa: E501
pods (int): The number of pods for the index to use,including replicas.. [optional] if omitted the server will use the default value of 1 # noqa: E501
replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput.. [optional] if omitted the server will use the default value of 1 # noqa: E501
shards (int): The number of shards to be used in the index.. [optional] if omitted the server will use the default value of 1 # noqa: E501
pod_type (str): The type of pod to use. One of 's1' or 'p1'.. [optional] if omitted the server will use the default value of "p1" # 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`.. [optional] if omitted the server will use the default value of "p1.x1" # noqa: E501
index_config (dict): [optional] # noqa: E501
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. To specify metadata fields to index, provide a JSON object of the following form: ``` {\"indexed\": [\"example_metadata_field\"]} ``` . [optional] # noqa: E501
source_collection (str): The name of the collection to create an index from. [optional] # noqa: E501
Expand Down Expand Up @@ -264,7 +264,7 @@ def __init__(self, name, dimension, *args, **kwargs): # noqa: E501
pods (int): The number of pods for the index to use,including replicas.. [optional] if omitted the server will use the default value of 1 # noqa: E501
replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput.. [optional] if omitted the server will use the default value of 1 # noqa: E501
shards (int): The number of shards to be used in the index.. [optional] if omitted the server will use the default value of 1 # noqa: E501
pod_type (str): The type of pod to use. One of 's1' or 'p1'.. [optional] if omitted the server will use the default value of "p1" # 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`.. [optional] if omitted the server will use the default value of "p1.x1" # noqa: E501
index_config (dict): [optional] # noqa: E501
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. To specify metadata fields to index, provide a JSON object of the following form: ``` {\"indexed\": [\"example_metadata_field\"]} ``` . [optional] # noqa: E501
source_collection (str): The name of the collection to create an index from. [optional] # noqa: E501
Expand Down
4 changes: 4 additions & 0 deletions pinecone/core/client/model/index_meta_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def openapi_types():
'shards': (int,), # noqa: E501
'pod_type': (str,), # noqa: E501
'index_config': (dict,), # noqa: E501
'metadata_config': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'status': (IndexMetaDatabaseStatus,), # noqa: E501
}

Expand All @@ -119,6 +120,7 @@ def discriminator():
'shards': 'shards', # noqa: E501
'pod_type': 'pod_type', # noqa: E501
'index_config': 'index_config', # noqa: E501
'metadata_config': 'metadata_config', # noqa: E501
'status': 'status', # noqa: E501
}

Expand Down Expand Up @@ -172,6 +174,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
shards (int): [optional] # noqa: E501
pod_type (str): [optional] # noqa: E501
index_config (dict): [optional] # noqa: E501
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
status (IndexMetaDatabaseStatus): [optional] # noqa: E501
"""

Expand Down Expand Up @@ -263,6 +266,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
shards (int): [optional] # noqa: E501
pod_type (str): [optional] # noqa: E501
index_config (dict): [optional] # noqa: E501
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
status (IndexMetaDatabaseStatus): [optional] # noqa: E501
"""

Expand Down
4 changes: 2 additions & 2 deletions pinecone/core/client/model/patch_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
replicas (int): The desired number of replicas for the index.. [optional] # noqa: E501
pod_type (str): The new pod type for the index.. [optional] # noqa: E501
pod_type (str): The new pod type for the index. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -225,7 +225,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
replicas (int): The desired number of replicas for the index.. [optional] # noqa: E501
pod_type (str): The new pod type for the index.. [optional] # noqa: E501
pod_type (str): The new pod type for the index. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
8 changes: 7 additions & 1 deletion pinecone/core/client/model/query_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@

def lazy_import():
from pinecone.core.client.model.query_vector import QueryVector
from pinecone.core.client.model.sparse_values import SparseValues
globals()['QueryVector'] = QueryVector
globals()['SparseValues'] = SparseValues


class QueryRequest(ModelNormal):
Expand Down Expand Up @@ -110,6 +112,7 @@ def openapi_types():
'include_metadata': (bool,), # noqa: E501
'queries': ([QueryVector],), # noqa: E501
'vector': ([float],), # noqa: E501
'sparse_vector': (SparseValues,), # noqa: E501
'id': (str,), # noqa: E501
}

Expand All @@ -126,6 +129,7 @@ def discriminator():
'include_metadata': 'includeMetadata', # noqa: E501
'queries': 'queries', # noqa: E501
'vector': 'vector', # noqa: E501
'sparse_vector': 'sparseVector', # noqa: E501
'id': 'id', # noqa: E501
}

Expand Down Expand Up @@ -179,6 +183,7 @@ def _from_openapi_data(cls, top_k, *args, **kwargs): # noqa: E501
include_metadata (bool): Indicates whether metadata is included in the response as well as the ids.. [optional] if omitted the server will use the default value of False # noqa: E501
queries ([QueryVector]): DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`.. [optional] # noqa: E501
vector ([float]): The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.. [optional] # noqa: E501
sparse_vector (SparseValues): [optional] # noqa: E501
id (str): The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`.. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -271,6 +276,7 @@ def __init__(self, top_k, *args, **kwargs): # noqa: E501
include_metadata (bool): Indicates whether metadata is included in the response as well as the ids.. [optional] if omitted the server will use the default value of False # noqa: E501
queries ([QueryVector]): DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`.. [optional] # noqa: E501
vector ([float]): The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.. [optional] # noqa: E501
sparse_vector (SparseValues): [optional] # noqa: E501
id (str): The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`.. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -308,4 +314,4 @@ def __init__(self, top_k, *args, **kwargs): # noqa: E501
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")
f"class with read only attributes.")
10 changes: 10 additions & 0 deletions pinecone/core/client/model/query_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
from pinecone.core.client.exceptions import ApiAttributeError


def lazy_import():
from pinecone.core.client.model.sparse_values import SparseValues
globals()['SparseValues'] = SparseValues


class QueryVector(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Expand Down Expand Up @@ -77,6 +81,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
Expand All @@ -91,8 +96,10 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'values': ([float],), # noqa: E501
'sparse_values': (SparseValues,), # noqa: E501
'top_k': (int,), # noqa: E501
'namespace': (str,), # noqa: E501
'filter': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
Expand All @@ -105,6 +112,7 @@ def discriminator():

attribute_map = {
'values': 'values', # noqa: E501
'sparse_values': 'sparseValues', # noqa: E501
'top_k': 'topK', # noqa: E501
'namespace': 'namespace', # noqa: E501
'filter': 'filter', # noqa: E501
Expand Down Expand Up @@ -154,6 +162,7 @@ def _from_openapi_data(cls, values, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
sparse_values (SparseValues): [optional] # noqa: E501
top_k (int): An override for the number of results to return for this query vector.. [optional] # noqa: E501
namespace (str): An override the namespace to search.. [optional] # noqa: E501
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional] # noqa: E501
Expand Down Expand Up @@ -242,6 +251,7 @@ def __init__(self, values, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
sparse_values (SparseValues): [optional] # noqa: E501
top_k (int): An override for the number of results to return for this query vector.. [optional] # noqa: E501
namespace (str): An override the namespace to search.. [optional] # noqa: E501
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): An override for the metadata filter to apply. This replaces the request-level filter.. [optional] # noqa: E501
Expand Down
12 changes: 11 additions & 1 deletion pinecone/core/client/model/scored_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
from pinecone.core.client.exceptions import ApiAttributeError


def lazy_import():
from pinecone.core.client.model.sparse_values import SparseValues
globals()['SparseValues'] = SparseValues


class ScoredVector(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Expand Down Expand Up @@ -75,6 +79,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
Expand All @@ -89,11 +94,13 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'id': (str,), # noqa: E501
'score': (float,), # noqa: E501
'values': ([float],), # noqa: E501
'metadata': ({str: (bool, date, dict, float, int, list, str, none_type)},), # noqa: E501
'sparse_values': (SparseValues,), # noqa: E501
'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
}

@cached_property
Expand All @@ -105,6 +112,7 @@ def discriminator():
'id': 'id', # noqa: E501
'score': 'score', # noqa: E501
'values': 'values', # noqa: E501
'sparse_values': 'sparseValues', # noqa: E501
'metadata': 'metadata', # noqa: E501
}

Expand Down Expand Up @@ -154,6 +162,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
score (float): This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar.. [optional] # noqa: E501
values ([float]): This is the vector data, if it is requested.. [optional] # noqa: E501
sparse_values (SparseValues): [optional] # noqa: E501
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -242,6 +251,7 @@ def __init__(self, id, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
score (float): This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar.. [optional] # noqa: E501
values ([float]): This is the vector data, if it is requested.. [optional] # noqa: E501
sparse_values (SparseValues): [optional] # noqa: E501
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): This is the metadata, if it is requested.. [optional] # noqa: E501
"""

Expand Down
Loading