feat: 为 ChatKit Voice 添加自定义 system prompt 支持#482
Merged
chenyme merged 5 commits intochenyme:mainfrom Apr 20, 2026
Merged
Conversation
- Add custom_instruction parameter to xai_livekit.py payload builder - Use 'instructions' + 'is_raw_instructions' fields instead of 'customPersonality' - Transport layer passes custom_instruction through - API endpoint accepts 'instruction' query param - Frontend: add expandable input with popup modal for editing - CSS: toolbar 520px, 4-column equal width layout, responsive on mobile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
为 ChatKit Voice 添加自定义 system prompt 支持。
用户可在工具栏输入自定义提示词,通过
instructions+is_raw_instructions: true字段传给 Grok LiveKit 后端,替代预定义的personality模板。修改了 5 个文件,形成完整透传链路:
custom_instruction非空时,使用instructions+is_raw_instructions+personality=null替代默认personality模板custom_instruction参数instruction查询参数留空提示词时行为与之前完全一致,向后兼容。
Testing
本地部署验证:
personality正常生效,行为不变sessionPayload结构,确认字段名instructions/is_raw_instructions与官方前端一致(从cdn.grok.com/_next/static/chunks/逆向确认)Related
Closes #