From df98cc07097c1ae17342fbde40a39c15aaf42e44 Mon Sep 17 00:00:00 2001 From: zy123 <646228430@qq.com> Date: Thu, 17 Oct 2024 15:39:34 +0800 Subject: [PATCH] =?UTF-8?q?10.17=20=E5=B0=8F=E8=A7=A3=E6=9E=90=E8=B4=A7?= =?UTF-8?q?=E7=89=A9=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flask_app/general/little_zbparse.py | 8 ++++---- flask_app/main/基础信息整合.py | 8 ++++---- flask_app/main/多线程提问.py | 2 +- flask_app/货物标/基础信息解析main.py | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flask_app/general/little_zbparse.py b/flask_app/general/little_zbparse.py index 53a9f65..86e11d3 100644 --- a/flask_app/general/little_zbparse.py +++ b/flask_app/general/little_zbparse.py @@ -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 diff --git a/flask_app/main/基础信息整合.py b/flask_app/main/基础信息整合.py index 4c0b03a..d7c5b4f 100644 --- a/flask_app/main/基础信息整合.py +++ b/flask_app/main/基础信息整合.py @@ -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) # 通过招标公告判断是否接受联合体投标 diff --git a/flask_app/main/多线程提问.py b/flask_app/main/多线程提问.py index f3dca74..a619a2a 100644 --- a/flask_app/main/多线程提问.py +++ b/flask_app/main/多线程提问.py @@ -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): diff --git a/flask_app/货物标/基础信息解析main.py b/flask_app/货物标/基础信息解析main.py index e04cc88..3dc0aad 100644 --- a/flask_app/货物标/基础信息解析main.py +++ b/flask_app/货物标/基础信息解析main.py @@ -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) # 通过招标公告判断是否接受联合体投标