Skip to content

Commit 9e711da

Browse files
committed
create openapi_client_config using a deep copy
1 parent 804bdd5 commit 9e711da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pinecone/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ScoredVector, SingleQueryResults, DescribeIndexStatsResponse, UpsertRequest, UpsertResponse, Vector
1212
from pinecone.core.client.api.vector_operations_api import VectorOperationsApi
1313
from pinecone.core.utils import fix_tuple_length, get_user_agent
14+
import copy
1415

1516
__all__ = [
1617
"Index", "FetchResponse", "ProtobufAny", "QueryRequest", "QueryResponse", "QueryVector", "RpcStatus",
@@ -28,7 +29,7 @@
2829
class Index(ApiClient):
2930

3031
def __init__(self, index_name: str, pool_threads=1):
31-
openapi_client_config = Config.OPENAPI_CONFIG
32+
openapi_client_config = copy.deepcopy(Config.OPENAPI_CONFIG)
3233
openapi_client_config.api_key = openapi_client_config.api_key or {}
3334
openapi_client_config.api_key['ApiKeyAuth'] = openapi_client_config.api_key.get('ApiKeyAuth', Config.API_KEY)
3435
openapi_client_config.server_variables = openapi_client_config.server_variables or {}

0 commit comments

Comments
 (0)