Repository navigation
Commit a3a3340
committed
fix(voice): the dictation cleanup prompt now asks for the JSON its parser requires
The dictation cleanup prompt ended with "Return only the cleaned transcript", but every reply path decodes a JSON object with a single transcription key. Providers with native structured output (Claude, Codex) never hit the gap, and Muse appends the schema itself, but providers that parse the reply as text (Prime, Droid) get prose back and fail every cleanup with "returned invalid structured output", so the raw transcript is inserted instead.
The prompt now ends with "Return only the cleaned transcript as a JSON object with key: transcription", the same embedded ask every other text generation prompt carries (subject/body, title/body, stops). The reply parsers and the native structured output paths are unchanged.
Proof: the prompt builder test fails on the old sentence and passes on the new one, and a live before/after through Prime on GLM-5.3, the provider that failed tonight, returned prose before and {"transcription": ...} after. The voice-cleanup eval needs a Codex CLI this machine does not have, so it did not run.
Claude Opus 5.5 in Prime Agent.1 parent 6577c6b commit a3a3340
2 files changed
Lines changed: 7 additions & 1 deletion
File tree
- apps/server/src/textGeneration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments