更新对话转工单处理逻辑,增强用户问题和解决方案提取功能,添加槽位填充支持,调整最大工作线程数为10,优化意图识别API,重排序匹配术语,改进数据模型以支持软件名称枚举,提升代码结构和可读性。

This commit is contained in:
2025-06-03 10:35:25 +08:00
parent d4ff7b6fad
commit 38b6f66925
8 changed files with 160 additions and 92 deletions
+3 -3
View File
@@ -121,7 +121,7 @@ def process_query(recognizer, query):
time.sleep(10 * retry_count)
# 示例查询
examples_query = """这个安全文明费费率在哪里调"""
examples_query = """储能软件组合件界面,点击隐藏空项目划分后界面没有任何变化"""
def main():
"""
@@ -138,7 +138,7 @@ def main():
# 读取提问数据
current_dir = os.path.dirname(os.path.abspath(__file__))
data_file = os.path.join(current_dir, "..", "..", "data", "excel", "测试提问数据.xlsx")
data_file = os.path.join(current_dir, "..", "..", "data", "excel", "400条提问意图分类数据-原始.xlsx")
# 检测是否为调试模式,调试模式下使用examples_query,否则从Excel读取
@@ -150,7 +150,7 @@ def main():
if not is_debug:
max_workers = 5 # 减少并发数以避免API限制
max_workers = 10 # 减少并发数以避免API限制
logging.info(f"共有 {len(examples)} 个问题需要处理,使用 {max_workers} 个并发线程")
# 创建一个与输入顺序相同的结果列表
results = [None] * len(examples)