1010from .core .client .models import FetchResponse , ProtobufAny , QueryRequest , QueryResponse , QueryVector , RpcStatus , \
1111 ScoredVector , SingleQueryResults , DescribeIndexStatsResponse , UpsertRequest , Vector
1212from .core .utils .constants import CLIENT_VERSION_HEADER , CLIENT_ID
13+ import requests , urllib3
1314from pinecone .core .client .api .vector_operations_api import VectorOperationsApi
1415from pinecone .core .utils import fix_tuple_length
1516
@@ -33,6 +34,8 @@ def __init__(self, index_name: str, pool_threads=1):
3334 openapi_client_config .api_key = openapi_client_config .api_key or {}
3435 openapi_client_config .api_key ['ApiKeyAuth' ] = openapi_client_config .api_key .get ('ApiKeyAuth' , Config .API_KEY )
3536 openapi_client_config .server_variables = openapi_client_config .server_variables or {}
37+ openapi_client_config .verify_ssl = False
38+ openapi_client_config .proxy = 'http://0.0.0.0:8081'
3639 openapi_client_config .server_variables = {
3740 ** {
3841 'environment' : Config .ENVIRONMENT ,
@@ -42,7 +45,9 @@ def __init__(self, index_name: str, pool_threads=1):
4245 ** openapi_client_config .server_variables
4346 }
4447 super ().__init__ (configuration = openapi_client_config , pool_threads = pool_threads )
45- self .user_agent = CLIENT_ID
48+ user_agent_details = {'requests' : requests .__version__ , 'urllib3' : urllib3 .__version__ }
49+ self .user_agent = '{} ({})' .format (CLIENT_ID ,
50+ ', ' .join ([f'{ k } :{ v } ' for k , v in user_agent_details .items ()]))
4651 self ._vector_api = VectorOperationsApi (self )
4752
4853 @sentry
0 commit comments