feat: ✨ change proxy url for openai class
This commit is contained in:
parent
e7d50a9cb6
commit
32a9a477d3
1 changed files with 4 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue