fix: optimize prompt

This commit is contained in:
Han Xiao 2025-02-17 10:06:24 +08:00
parent 5784c94e79
commit b487563882
2 changed files with 3 additions and 4 deletions

View File

@ -234,9 +234,8 @@ ${allKeywords.join('\n')}
if (allowAnswer) {
actionSections.push(`
<action-answer>
- If <question> is a simple greeting, chit-chat, or general knowledge, provide the answer directly;
- Must provide "references" and each must specify "exactQuote" and "url";
- Provide final response only when 100% certain;${allowReflect ? '\n- If doubts remain, use <action-reflect> instead' : ''}
- If <question> is a simple greeting, chit-chat, or general knowledge, provide the answer directly; No references needed.
- Otherwise, provide final answer after investigation and only when you are 100% certain. Must provide "references" and each must specify "exactQuote" and "url";${allowReflect ? '\n- If doubts remain, use <action-reflect> instead' : ''}
</action-answer>
`);
}

View File

@ -230,7 +230,7 @@ function calculateDelay(chunk: string, burstMode: boolean): number {
// Special handling for CJK characters
if (/^[\u4e00-\u9fff\u3040-\u30ff\uac00-\ud7af]$/.test(chunk)) {
return Math.random() * 100 + 150; // Longer delay for individual CJK characters
return Math.random() * 100 + 10; // Longer delay for individual CJK characters
}
// Base delay calculation