1 parent bc68e14 commit 8491555Copy full SHA for 8491555
2 files changed
stream_translator_gpt/common.py
@@ -110,6 +110,7 @@ def init(cls,
110
key = key.strip()
111
client = OpenAI(
112
api_key=key,
113
+ base_url=openai_base_url,
114
default_headers={'User-Agent': f'stream-translator-gpt/{__version__}'},
115
http_client=httpx.Client(proxy=proxy, verify=verify),
116
)
stream_translator_gpt/main.py
@@ -235,9 +235,6 @@ class Config:
235
236
def run(config: Config):
237
"""Run the transcription / translation pipeline until the input is exhausted."""
238
- if config.openai_base_url:
239
- os.environ['OPENAI_BASE_URL'] = config.openai_base_url
240
-
241
ClientPool.init(openai_api_key=config.openai_api_key,
242
google_api_key=config.google_api_key,
243
proxy=config.processing_proxy,
0 commit comments