修改提示词

This commit is contained in:
Tiger Ren 2024-10-17 00:22:48 +08:00
parent 2d6b58807f
commit ac3c9dd355
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import logging,json
from datetime import datetime
from flask import Blueprint, request, Response
from flask import Blueprint, request, Response,session
from app.services.zhipu_service import ZhipuService
from app.services.zhipu_alltool_service import ZhipuAlltoolService
from app.services.zhipu_file_service import ZhipuFileService
@ -78,7 +78,7 @@ def retrive_stream():
prompt_project_info = "项目:数字电网项目"
prompt_date = datetime.now().strftime("%Y-%m-%d")
prompt_report_template = PromptRepository().get_prompt("report_template")
prompt_report_title = f"根据日志模版的样式,查询{prompt_project_info} {prompt_date} 销售日志并生成日志报告,注意需要同时提取非项目进展的信息。如果有缺失的要点,请提示用户补充信息\n {prompt_report_template}。输出1. 日志报告 \n 2. 缺失的要点(如果存在)"
prompt_report_title = f"根据日志模版的样式,查询{prompt_project_info} 销售日志并生成日志报告,注意需要同时提取非项目进展的信息。如果有缺失的要点(时间、参与人、事件、获得信息、信息来源、事件结果描述),假如日志没有明确按照要点提供信息,则认为缺失,不要从其他要点中总结,\n {prompt_report_template}。输出按照模版的markdown格式1. 日志报告 \n 2. 缺失的要点(如果存在)"
generated_report = ""
for chunk in zhipu_service.retrive_sse(prompt_report_title + message, knowledge_id, None):
if chunk:
@ -104,7 +104,7 @@ def retrive_stream():
prompt_project_info = "项目:数字电网项目"
prompt_date = datetime.now().strftime("%Y-%m-%d")
prompt_report_template = PromptRepository().get_prompt("report_template")
prompt_report_title = f"根据日志模版的样式,查询{prompt_project_info} {prompt_date} 销售日志并生成日志报告,注意需要同时提取非项目进展的信息。如果有缺失的要点,请提示用户补充信息,如有多个版本,请合并信息\n {prompt_report_template}。输出1. 日志报告 \n 2. 缺失的要点(如果存在)"
prompt_report_title = f"根据日志模版的样式,查询{prompt_project_info} 销售日志并生成日志报告,注意需要同时提取非项目进展的信息。如果有缺失的要点(时间、参与人、事件、获得信息、信息来源、事件结果描述),如果日志没有明确按照要点提供信息,则认为缺失,不要从其他要点中总结,如有多个版本,请合并信息\n {prompt_report_template}。输出按照模版的markdown格式1. 日志报告 \n 2. 缺失的要点(如果存在)"
generated_report = ""
for chunk in zhipu_service.retrive_sse(prompt_report_title + message, knowledge_id, None):
if chunk: