From bf2466d91c8cd9b03135cf82f7fe53795c48a982 Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Sun, 30 Apr 2023 14:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=96=87=E7=9A=84prompt?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/model_config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configs/model_config.py b/configs/model_config.py index 1afc537..3147b6a 100644 --- a/configs/model_config.py +++ b/configs/model_config.py @@ -38,8 +38,14 @@ VS_ROOT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "vector_ UPLOAD_ROOT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "content", "") # 基于上下文的prompt模版,请务必保留"{question}"和"{context}" -PROMPT_TEMPLATE = """基于以下已知信息,简洁和专业的来回答用户的问题,问题是"{question}"。如果无法从中得到答案,请说 "根据已知信息无法回答该问题" 或 "没有提供足够的相关信息",不允许在答案中添加编造成分,答案请使用中文。已知内容如下: -{context} """ +PROMPT_TEMPLATE = """已知信息在下方"="包裹的段落,基于以下已知信息,简洁和专业的来回答用户的问题。如果无法从中得到答案,请说 "根据已知信息无法回答该问题" 或 "没有提供足够的相关信息",不允许在答案中添加编造成分,答案请使用中文。 + +====================================已知信息===================================================== +{context} +================================================================================================ + +问题:"{question}" +答案:""" # 匹配后单段上下文长度 CHUNK_SIZE = 500 \ No newline at end of file