2024-09-26 18:06:23 +08:00

20 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import json
from flask_app.main.json_utils import extract_content_from_json
from flask_app.main.多线程提问 import multi_threading
from flask_app.货物标.资格审查main import update_json_data
ques=["关于'资格要求',本采购文件第一章第二款要求的内容是怎样的请按json格式给我提供信息键名为'资格性审查.资格要求',你不能回答而键值需要完全与原文保持一致,不要擅自总结、删减,如果存在未知信息,请在对应键值处填'未知'"]
knowledge_name="6.2视频会议docx"
results = multi_threading(ques, knowledge_name) # 无序号的直接问大模型
first_response_list = []
for _, response in results:
try:
if response and len(response) > 1: # 检查response存在且有至少两个元素
temp = extract_content_from_json(response[1])
first_response_list.append(temp)
else:
print(f"形式响应评审Warning: Missing or incomplete response data for query index {_}.")
except Exception as e:
print(f"形式响应评审Error processing response for query index {_}: {e}")
print(first_response_list)