fix: прокси для OpenAI Whisper API (403 без прокси)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-30 17:32:52 +10:00
co-authored by Claude Opus 4.6
parent 8d3977c9e3
commit 9b68e3624a
+2 -1
View File
@@ -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",