brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
lov-integrate-lovstudio-llm-skill通过 LovStudio.AI 的 OpenAI-compatible API 完成文本对话、语音转文字、语音翻译、语音合成与 Realtime 音频会话;用户说“接入 Lovstudio LLM”“调用语音转文字”或 “use LovStudio API” 时触发。
Independent GitHub snapshot · Automated classification · Original documentation governs
把 LovStudio.AI 作为统一的 OpenAI-compatible 模型入口,按任务调用文本、音频和 Realtime API,并返回可继续处理的结构化结果。
Every generated Skill is connected to the shared user-profile/v1 contract in
skill.yaml. Read the shared user, brand, workspace, preferences, and this
Skill's skills.<skill_id> namespace at the start of every run. Keep the source
portable: resolved personal values belong in the shared profile, never here.
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
You MUST follow these steps in order.
SKILL_DIR if the environment provides it.When running scripts manually:
export SKILL_DIR="/path/to/lov-integrate-lovstudio-llm-skill"
Resolve context.profile on every invocation. The precedence is current request,
project context, Skill-specific profile records, shared preferences, shared
brand/user profile, then safe defaults. A direct user statement about a durable
preference or brand fact should be saved with scripts/profile_store.py record
using --confirm, followed by a concise saved-path report.
skills.lov-integrate-lovstudio-llm-skill records through scripts/profile_store.py read --skill-id lov-integrate-lovstudio-llm-skill.references/api-contract.md when choosing an endpoint, model, audio format, or Realtime event.LOVSTUDIO_API_KEY from the process environment. Never place it in a prompt, Profile record, source file, or command argument.LOVSTUDIO_BASE_URL when supplied; the default is https://llm.lovstudio.ai/v1.Use the deterministic local clients. They emit JSON on success and a copyable context_id on errors.
| Goal | Command | Default model |
|---|---|---|
| Text response | python3 "$SKILL_DIR/scripts/lovstudio_llm.py" chat --prompt "..." | gpt-4o-mini |
| Speech to text | python3 "$SKILL_DIR/scripts/lovstudio_llm.py" transcribe --file INPUT | whisper-1 |
| Audio translation | python3 "$SKILL_DIR/scripts/lovstudio_llm.py" translate --file INPUT | whisper-1 |
| Text to speech | python3 "$SKILL_DIR/scripts/lovstudio_llm.py" speech --text "..." --output OUTPUT.mp3 | gpt-4o-mini-tts |
| Realtime audio input | python3 "$SKILL_DIR/scripts/realtime_client.py" --file INPUT.pcm | gpt-realtime |
For Chat Completions with conversation history, pass a JSON array through
--messages-json or a UTF-8 file through --messages-file. Use --model for
an explicit model choice. Keep --api-key out of the interface so credentials
stay outside shell history.
The Realtime client expects mono PCM16 at 24 kHz. It sends audio in timed chunks, requests text output, and can return the model's recognized speech as a reply. Convert a WAV or AIFF file with an installed media tool before calling it:
ffmpeg -i INPUT.wav -ar 24000 -ac 1 -f s16le INPUT.pcm
python3 "$SKILL_DIR/scripts/realtime_client.py" \
--file INPUT.pcm \
--response-instructions "请逐字复述刚才听到的中文语音。"
If the HTTP transcription command returns model_not_found, preserve its
context_id and check the active channel's audio-transcription model list.
Realtime remains the voice-input path when the provider exposes Realtime but
has not enabled /v1/audio/transcriptions.
status, operation, model, and output field before presenting the result.context_id, operation, source, HTTP status, and message so the caller can copy them for debugging.python3 "$SKILL_DIR/scripts/validate_skill.py" "$SKILL_DIR" when changing the Skill source.LOVSTUDIO_API_KEY environment variable and network access to the configured endpoint.ffmpeg or another media converter when preparing PCM16 Realtime input.