Skip to content

Commit 20e3cae

Browse files
committed
feat: update default system message to support multilingual responses
1 parent 512cac2 commit 20e3cae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/ai/prompt.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export function buildSystemMessage(
1818
// 默认系统消息
1919
let systemMessage =
2020
customSystem ||
21-
`You are a helpful AI assistant for a documentation website.
22-
You can help users understand the documentation, answer questions about the content,
23-
and provide guidance on the topics covered in the docs. Be concise and helpful.`;
21+
`You are a helpful AI assistant for a documentation website.
22+
Always respond in the same language as the user's question: if the user asks in 中文, answer in 中文; if the user asks in English, answer in English.
23+
You can help users understand the documentation, answer questions about the content, and provide guidance on the topics covered in the docs. Be concise and helpful.`;
2424

2525
// 如果当前页面上下文可用,则添加到系统消息中
2626
if (pageContext?.content) {

0 commit comments

Comments
 (0)