fix(skills): honor OPENAI_BASE_URL in whisper api skill (#55597)

* fix(skills): honor OPENAI_BASE_URL in whisper api skill

* Update skills/openai-whisper-api/SKILL.md

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: Asaf (via Bruh) <asaf@asafshq.win>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
lurebat
2026-03-27 16:23:26 +03:00
committed by GitHub
parent 45535ff433
commit 4cf783b7c1
2 changed files with 6 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ metadata:
# OpenAI Whisper API (curl)
Transcribe an audio file via OpenAIs `/v1/audio/transcriptions` endpoint.
Transcribe an audio file via OpenAIs `/v1/audio/transcriptions` endpoint. Set `OPENAI_BASE_URL` to use an OpenAI-compatible proxy or local gateway.
## Quick start
@@ -49,7 +49,7 @@ Defaults:
## API key
Set `OPENAI_API_KEY`, or configure it in `~/.openclaw/openclaw.json`:
Set `OPENAI_API_KEY`, or configure it in `~/.openclaw/openclaw.json`. Optionally set `OPENAI_BASE_URL` (for example `http://127.0.0.1:51805/v1`) to use an OpenAI-compatible proxy or local gateway:
```json5
{

View File

@@ -72,7 +72,10 @@ fi
mkdir -p "$(dirname "$out")"
curl -sS https://api.openai.com/v1/audio/transcriptions \
api_base="${OPENAI_BASE_URL:-https://api.openai.com/v1}"
api_base="${api_base%/}"
curl -sS "${api_base}/audio/transcriptions" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Accept: application/json" \
-F "file=@${in}" \