fix(podcast): start generated scripts with the Zap Podcast intro - #129
fix(podcast): start generated scripts with the Zap Podcast intro#129i-xtsu-sixyou-ken-mei wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01257260d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| expect(prompt).toContain( | ||
| `輸出的第一句必須逐字為:「${EXPECTED_OPENING}」`, |
There was a problem hiding this comment.
Enforce the opening after model generation
When the configured OpenRouter model ignores this instruction or adds whitespace/chatter—the exact failure this change is intended to fix—the pipeline still accepts, persists, and sends that response to TTS because generateScriptWithLLM only rejects empty output and otherwise returns the content unchanged (llm.ts:309-314). This test merely confirms that the instruction exists in the prompt, so it passes even though the advertised exact prefix remains nondeterministic; validate or normalize the returned script before it is persisted.
Useful? React with 👍 / 👎.
Summary
各位觀眾朋友,歡迎收聽今天的 Zap Podcast。Why
The LLM currently prepends meta text such as
好的,這是一份...請直接朗讀and may include timestamps or separators. The prompt previously described the desired script style but did not define an exact output prefix.Testing
script-system-prompt.strict.test.tsto verify the prompt retains the exact opening and no-preamble contract.