Fix frontend opener showing

This commit is contained in:
Xin Wang
2026-02-12 14:46:16 +08:00
parent ef13ddb6b2
commit a7ef8858de
2 changed files with 8 additions and 9 deletions

View File

@@ -409,12 +409,13 @@ class DuplexPipeline:
prompt_hint = (self._runtime_greeting or "").strip()
system_prompt = (
"You generate one concise opener for a live voice call assistant. "
"Return plain text only, no quotes, no markdown, one sentence."
"你是语音通话助手的开场白生成器。"
"请只输出一句自然、简洁、友好的中文开场白。"
"不要使用引号,不要使用 markdown不要加解释。"
)
user_prompt = "Generate a friendly opening line (max 25 words)."
user_prompt = "请生成一句中文开场白不超过25个汉字"
if prompt_hint:
user_prompt += f" Style hint: {prompt_hint}"
user_prompt += f" 风格提示:{prompt_hint}"
try:
generated = await self.llm_service.generate(

View File

@@ -1636,7 +1636,6 @@ export const DebugDrawer: React.FC<{
await ensureWsSession();
await startVoiceCapture();
setCallStatus('active');
setMessages([]);
} catch (e) {
console.error(e);
stopVoiceCapture();
@@ -1707,7 +1706,6 @@ export const DebugDrawer: React.FC<{
if (textTtsEnabled) await ensureAudioContext();
await ensureWsSession();
setTextSessionStarted(true);
setMessages([]);
} catch (e) {
console.error(e);
setWsStatus('error');