Skip to content

Commit

Permalink
add support for passing controller_host to client_config for the ApiC…
Browse files Browse the repository at this point in the history
…lient
  • Loading branch information
austin-denoble committed Oct 12, 2023
1 parent 792b801 commit 6c031f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pinecone/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ def _get_api_instance():
client_config.api_key = client_config.api_key or {}
client_config.api_key["ApiKeyAuth"] = client_config.api_key.get("ApiKeyAuth", Config.API_KEY)
client_config.server_variables = {**{"environment": Config.ENVIRONMENT}, **client_config.server_variables}

# If a custom host has been passed with initialization pass it to the client_config
if (Config.CONTROLLER_HOST):
client_config.host = Config.CONTROLLER_HOST

api_client = ApiClient(configuration=client_config)
api_client.user_agent = get_user_agent()
api_instance = IndexOperationsApi(api_client)
Expand Down

0 comments on commit 6c031f0

Please sign in to comment.