mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
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:
@@ -25,7 +25,7 @@ metadata:
|
||||
|
||||
# OpenAI Whisper API (curl)
|
||||
|
||||
Transcribe an audio file via OpenAI’s `/v1/audio/transcriptions` endpoint.
|
||||
Transcribe an audio file via OpenAI’s `/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
|
||||
{
|
||||
|
||||
@@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user