调整问答的语气
This commit is contained in:
parent
d9caf9acce
commit
92f93d00d9
|
|
@ -16,7 +16,7 @@ class ZhipuKbService:
|
||||||
logger.info("Starting retrive call with knowledge_id: %s", knowledge_id)
|
logger.info("Starting retrive call with knowledge_id: %s", knowledge_id)
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
client = ZhipuAI(api_key=self.app_secret_key)
|
client = ZhipuAI(api_key=self.app_secret_key)
|
||||||
default_prompt = "从文档\n\"\"\"\n{{knowledge}}\n\"\"\"\n中找问题\n\"\"\"\n{{question}}\n\"\"\"\n的答案,找到答案就仅使用文档语句回答问题,找不到答案就用自身知识回答并且告诉用户该信息不是来自文档。\n不要复述问题,直接开始回答。"
|
default_prompt = "从文档\n\"\"\"\n{{knowledge}}\n\"\"\"\n中找问题\n\"\"\"\n{{question}}\n\"\"\"\n的答案,找到答案就仅使用文档语句回答问题,找不到答案就用自身知识回答并且告诉用户该信息不是来自文档。\n不要复述问题,直接开始回答。你是一个智能助理,请用该角色的语言风格和对话方式回答问题。"
|
||||||
|
|
||||||
if prompt_template is None or prompt_template == "":
|
if prompt_template is None or prompt_template == "":
|
||||||
prompt_template = default_prompt
|
prompt_template = default_prompt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue