fix: прокси для OpenAI Whisper API (403 без прокси)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -306,7 +306,8 @@ async def transcribe_voice(file_path: str) -> str:
|
||||
if not api_key:
|
||||
return ""
|
||||
|
||||
async with httpx.AsyncClient(timeout=30) as client:
|
||||
proxy = os.environ.get("OPENAI_PROXY") or os.environ.get("HTTPS_PROXY")
|
||||
async with httpx.AsyncClient(timeout=30, proxy=proxy) as client:
|
||||
with open(file_path, "rb") as f:
|
||||
resp = await client.post(
|
||||
"https://api.openai.com/v1/audio/transcriptions",
|
||||
|
||||
Reference in New Issue
Block a user