|
|
@ -50,13 +50,11 @@ async def rag(request: fastapi.Request):
|
|
|
|
output_model = data.get("output_model", "txt")
|
|
|
|
output_model = data.get("output_model", "txt")
|
|
|
|
|
|
|
|
|
|
|
|
if output_model == "txt":
|
|
|
|
if output_model == "txt":
|
|
|
|
user_prompt = "\n 1、不要输出参考资料 或者 References !也不要标识DC或者KG!"
|
|
|
|
user_prompt = "1、资料中提供化学反应方程式的,一定要严格按提供的Latex公式输出,绝对不允许对Latex公式进行修改 !"
|
|
|
|
user_prompt = user_prompt + "\n 2、资料中提供化学反应方程式的,一定要严格按提供的Latex公式输出,绝对不允许对Latex公式进行修改 !"
|
|
|
|
user_prompt = user_prompt + "\n 2、如果资料中提供了图片的,一定要严格按照原文提供图片输出,绝对不能省略或不输出!"
|
|
|
|
user_prompt = user_prompt + "\n 3、如果资料中提供了图片的,一定要严格按照原文提供图片输出,绝对不能省略或不输出!"
|
|
|
|
user_prompt = user_prompt + "\n 3、资料中提到的知识内容,需要判断是否与本次问题相关,不相关的绝对不要输出!"
|
|
|
|
# user_prompt = user_prompt + "\n 4、资料中提到的知识内容,需要判断是否与本次问题相关,不相关的绝对不要输出!"
|
|
|
|
user_prompt = user_prompt + "\n 4、如果问题与提供的知识库内容不符,则明确告诉未在知识库范围内提到!"
|
|
|
|
user_prompt = user_prompt + "\n 4、根据资料回答问题,可以适当拓展一下内容进行回答!"
|
|
|
|
user_prompt = user_prompt + "\n 5、发现输出内容中包含Latex公式的,一定要检查是不是包含了$$或$的包含符号,不能让Latex无包含符号出现!"
|
|
|
|
user_prompt = user_prompt + "\n 5、如果问题与提供的知识库内容不符,则明确告诉未在知识库范围内提到!"
|
|
|
|
|
|
|
|
user_prompt = user_prompt + "\n 6、发现输出内容中包含Latex公式的,一定要检查是不是包含了$$或$的包含符号,不能让Latex无包含符号出现!"
|
|
|
|
|
|
|
|
elif output_model == 'html':
|
|
|
|
elif output_model == 'html':
|
|
|
|
user_prompt = """
|
|
|
|
user_prompt = """
|
|
|
|
我需要一个专业的交互式数据可视化,数据资料我将提供,你也可以根据自己了解的信息进行补充,
|
|
|
|
我需要一个专业的交互式数据可视化,数据资料我将提供,你也可以根据自己了解的信息进行补充,
|
|
|
|