From dddb8540a6068e4573d42e82694ee0de0fa2667a Mon Sep 17 00:00:00 2001 From: Ethan Zhang Date: Thu, 17 Oct 2024 17:32:52 -0700 Subject: [PATCH] feat: support socks5 proxy for openai extension (#342) --- agents/ten_packages/extension/openai_chatgpt_python/openai.py | 1 + .../extension/openai_chatgpt_python/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/agents/ten_packages/extension/openai_chatgpt_python/openai.py b/agents/ten_packages/extension/openai_chatgpt_python/openai.py index 3449126d..86ec1aa6 100644 --- a/agents/ten_packages/extension/openai_chatgpt_python/openai.py +++ b/agents/ten_packages/extension/openai_chatgpt_python/openai.py @@ -69,6 +69,7 @@ def __init__(self, config: OpenAIChatGPTConfig): "http": config.proxy_url, "https": config.proxy_url, } + logger.info(f"Setting proxies: {proxies}") self.session.proxies.update(proxies) self.client.session = self.session diff --git a/agents/ten_packages/extension/openai_chatgpt_python/requirements.txt b/agents/ten_packages/extension/openai_chatgpt_python/requirements.txt index 51cdd053..2ad22ea8 100644 --- a/agents/ten_packages/extension/openai_chatgpt_python/requirements.txt +++ b/agents/ten_packages/extension/openai_chatgpt_python/requirements.txt @@ -1,4 +1,4 @@ openai numpy -requests +requests[socks] pillow \ No newline at end of file