Commit bb47c76f authored by 于飞's avatar 于飞

是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了

parent f37418c2
......@@ -387,6 +387,18 @@ async def chat_completions(
media_type="text/plain",
)
#判断select_param是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了。
"""
if dialogue.select_param != "非遗项目":
print('这个知识库需要精确回答')
result = f" " #返回空的回答内容
return StreamingResponse(
stream_generator_sensitive(dialogue.incremental, result),
headers=headers,
media_type="text/plain",
)
"""
domain_type = _parse_domain_type(dialogue)
if dialogue.chat_mode == ChatScene.ChatAgent.value():
return StreamingResponse(
......
......@@ -115,6 +115,18 @@ async def chat_completions(
media_type="text/plain",
)
# 判断select_param是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了。
"""
if request.knowledge_space != "非遗项目":
print('这个知识库需要精确回答')
result = f" " #返回空的回答内容
return StreamingResponse(
stream_generator_sensitive(request.incremental, result),
headers=headers,
media_type="text/plain",
)
"""
# check chat request
check_chat_request(request)
if request.conv_uid is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment