10.17 小解析货物标
This commit is contained in:
parent
eaf9d93e15
commit
df98cc0709
@ -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
|
||||
|
@ -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) # 通过招标公告判断是否接受联合体投标
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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) # 通过招标公告判断是否接受联合体投标
|
||||
|
Loading…
x
Reference in New Issue
Block a user