fix: pass apiBase from config to GroqTranscriptionProvider

This commit is contained in:
flobo3 authored and Xubin Ren committed 2026-04-17 13:46:51 +08:00
1 parent cc5a666d5d
commit 0401ca9dbc
3 files changed
+18 -3

No files matched your search

+2 -2
View File
@@ -44,9 +44,9 @@ class GroqTranscriptionProvider:
Groq offers extremely fast transcription with a generous free tier.
"""
def __init__(self, api_key: str | None = None):
def __init__(self, api_key: str | None = None, api_base: str | None = None):
self.api_key = api_key or os.environ.get("GROQ_API_KEY")
self.api_url = "https://api.groq.com/openai/v1/audio/transcriptions"
self.api_url = api_base or os.environ.get("GROQ_BASE_URL") or "https://api.groq.com/openai/v1/audio/transcriptions"
async def transcribe(self, file_path: str | Path) -> str:
"""