10.17 小解析货物标

This commit is contained in:
zy123 2024-10-17 15:39:34 +08:00
parent eaf9d93e15
commit df98cc0709
4 changed files with 13 additions and 13 deletions

View File

@ -24,8 +24,8 @@ def get_global_logger(unique_id):
logger = None
def get_base_info(baseinfo_file_path):
file_id = upload_file(baseinfo_file_path)
# baseinfo_file_path='flask_app/static/提示词/基本信息货物标.txt'
baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\基本信息货物标.txt'
baseinfo_file_path='flask_app/static/提示词/基本信息货物标.txt'
# baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\基本信息货物标.txt'
questions = read_questions_from_file(baseinfo_file_path)
more_query = "请你根据招标文件信息,回答以下问题:是否组织踏勘现场?是否召开投标预备会(或投标答疑会)?是否退还投标文件?是否允许分包? 是否需要递交投标保证金或磋商保证金是否需要提交履约保证金或履约担保是否有招标代理服务费或中标、成交服务费请按json格式给我提供信息键名分别为'是否组织踏勘现场','是否召开投标预备会'(或'是否召开投标答疑会','是否退还投标文件',是否允许分包','是否递交投标保证金'(或'是否递交磋商保证金','是否提交履约保证金','是否有招标代理服务费',键值仅限于'','','未知',若存在矛盾信息,请回答'未知'"
questions.append(more_query)
@ -34,8 +34,8 @@ def get_base_info(baseinfo_file_path):
chosen_numbers, merged = merge_json_to_list(baseinfo_list.pop())
baseinfo_list.append(merged)
# judge_file_path = 'flask_app/static/提示词/是否相关问题货物标.txt'
judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题货物标.txt'
judge_file_path = 'flask_app/static/提示词/是否相关问题货物标.txt'
# judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题货物标.txt'
judge_questions = read_questions_from_judge(judge_file_path, chosen_numbers)
res2 = multi_threading(judge_questions, "", file_id, 2) # 调用千问-long

View File

@ -114,8 +114,8 @@ def combine_basic_info(knowledge_name, truncate0, output_folder, clause_path):
- dict: 综合后的基础信息
"""
baseinfo_list = []
# baseinfo_file_path = 'flask_app/static/提示词/前两章提问总结.txt'
baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\前两章提问总结.txt'
baseinfo_file_path = 'flask_app/static/提示词/前两章提问总结.txt'
# baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\前两章提问总结.txt'
questions = read_questions_from_file(baseinfo_file_path)
res1 = multi_threading(questions, knowledge_name)
@ -132,8 +132,8 @@ def combine_basic_info(knowledge_name, truncate0, output_folder, clause_path):
chosen_numbers, merged = judge_whether_main(truncate0, output_folder)
baseinfo_list.append(merged)
# judge_file_path = 'flask_app/static/提示词/是否相关问题.txt'
judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题.txt'
judge_file_path = 'flask_app/static/提示词/是否相关问题.txt'
# judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题.txt'
judge_questions = read_questions_from_judge(judge_file_path, chosen_numbers)
judge_consortium = judge_consortium_bidding(baseinfo_list) # 通过招标公告判断是否接受联合体投标

View File

@ -257,7 +257,7 @@ def multi_threading(queries, knowledge_name="", file_id="", llm_type=1):
for index, query in enumerate(queries):
future = executor.submit(llm_call, query, knowledge_name, file_id, result_queue, index, llm_type)
future_to_query[future] = index
time.sleep(1) # 每提交一个任务后等待1秒
# time.sleep(1) # 每提交一个任务后等待1秒
# 收集每个线程的结果
for future in concurrent.futures.as_completed(future_to_query):

View File

@ -100,8 +100,8 @@ def dynamic_key_handling(key_groups, detected_keys):
def get_base_info(baseinfo_file_path):
file_id = upload_file(baseinfo_file_path)
# baseinfo_file_path='flask_app/static/提示词/基本信息货物标.txt'
baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\基本信息货物标.txt'
baseinfo_file_path='flask_app/static/提示词/基本信息货物标.txt'
# baseinfo_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\基本信息货物标.txt'
questions = read_questions_from_file(baseinfo_file_path)
more_query = "请你根据招标文件信息,回答以下问题:是否组织踏勘现场?是否召开投标预备会(或投标答疑会)?是否退还投标文件?是否允许分包? 是否需要递交投标保证金或磋商保证金是否需要提交履约保证金或履约担保是否有招标代理服务费或中标、成交服务费请按json格式给我提供信息键名分别为'是否组织踏勘现场','是否召开投标预备会'(或'是否召开投标答疑会','是否退还投标文件',是否允许分包','是否递交投标保证金'(或'是否递交磋商保证金','是否提交履约保证金','是否有招标代理服务费',键值仅限于'','','未知',若存在矛盾信息,请回答'未知'"
questions.append(more_query)
@ -110,8 +110,8 @@ def get_base_info(baseinfo_file_path):
chosen_numbers, merged = merge_json_to_list(baseinfo_list.pop())
baseinfo_list.append(merged)
# judge_file_path = 'flask_app/static/提示词/是否相关问题货物标.txt'
judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题货物标.txt'
judge_file_path = 'flask_app/static/提示词/是否相关问题货物标.txt'
# judge_file_path = 'D:\\flask_project\\flask_app\\static\\提示词\\是否相关问题货物标.txt'
judge_questions = read_questions_from_judge(judge_file_path, chosen_numbers)
# print(judge_questions)
judge_consortium = judge_consortium_bidding(baseinfo_list) # 通过招标公告判断是否接受联合体投标