From e68fbd8a0dee5864a4e8f2f35128a2b818944db1 Mon Sep 17 00:00:00 2001 From: weixin_44463441 Date: Tue, 29 Aug 2023 13:08:03 +0800 Subject: [PATCH] Tue Aug 29 13:08:03 CST 2023 inscode --- src/js/config.js | 2 +- src/js/prompt.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/config.js b/src/js/config.js index 5c83f4e..6be99f7 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -61,7 +61,7 @@ export default { "default_prompt": default_prompt, "max_request_len": "2048", "prompt_template": prompt_template, - "api_prompt_prefix":"如果问题不是技术问题,请直接回答不知道。\n问题为:", + "api_prompt_prefix":"结合上下文回答问题,如果问题不是技术问题,请直接回答不知道。\n问题为:", "show_profile_setting":false, "index_url": index_url, "index_name":"inscode", diff --git a/src/js/prompt.js b/src/js/prompt.js index 552d0c4..f350a92 100644 --- a/src/js/prompt.js +++ b/src/js/prompt.js @@ -60,7 +60,7 @@ export default { if (config?.prompt_template) { const contextContent = getContextContent(context, config?.max_request_len??1024) message.unshift({ - "role": "user", + "role": "system", "content": config.prompt_template.replace(/\{question\}/ig, '').replace(/\{context\}/ig, contextContent).replace(/\{user_call_name\}/ig, config.user_call_name) }) } -- GitLab