feat: ✨ change proxy url for openai class

This commit is contained in:
Nate Sesti 2023-08-31 09:34:35 -07:00
parent e7d50a9cb6
commit 32a9a477d3

View file

@ -51,6 +51,7 @@ class OpenAI(LLM):
openai_server_info: Optional[OpenAIServerInfo] = None
verify_ssl: Optional[bool] = None
ca_bundle_path: Optional[str] = None
proxy: Optional[str] = None
requires_write_log = True
@ -76,6 +77,9 @@ class OpenAI(LLM):
if self.verify_ssl is not None and self.verify_ssl is False:
openai.verify_ssl_certs = False
if self.proxy is not None:
openai.proxy = self.proxy
openai.ca_bundle_path = self.ca_bundle_path or certifi.where()
async def stop(self):