jiaqiang 2 дней назад
Родитель
Сommit
017a2c3f2d
1 измененных файлов с 6 добавлено и 9 удалено
  1. 6 9
      llmops/batch_runner_all.py

+ 6 - 9
llmops/batch_runner_all.py

@@ -85,13 +85,15 @@ async def run_single_flow(run_id: str, question: str, industry: str, file_name:
 
 
     # 设置环境变量,让所有agent使用正确的文件夹
     # 设置环境变量,让所有agent使用正确的文件夹
     os.environ['FLOW_RUN_ID'] = run_id
     os.environ['FLOW_RUN_ID'] = run_id
-
+    from llmops.config import LLM_API_KEY,LLM_BASE_URL, LLM_MODEL_NAME
     try:
     try:
         result = await run_flow(
         result = await run_flow(
             question=question,
             question=question,
             industry=industry,
             industry=industry,
             original_file_path=file_name,
             original_file_path=file_name,
-            api_key=config.DEEPSEEK_API_KEY,
+            api_key=LLM_API_KEY,
+            base_url=LLM_BASE_URL,
+            model_name=LLM_MODEL_NAME,
             session_id=f"batch-run-{run_id}"
             session_id=f"batch-run-{run_id}"
         )
         )
 
 
@@ -153,20 +155,15 @@ async def run_batch(runs: int, question: str, industry: str, data_file: str):
         industry: 行业
         industry: 行业
         data_file: 原始数据文件路径,格式支持pdf/img/csv
         data_file: 原始数据文件路径,格式支持pdf/img/csv
     """
     """
+    from llmops.config import LLM_MODEL_NAME
     print("🚀 批量运行器启动")
     print("🚀 批量运行器启动")
     print(f"📊 计划运行次数: {runs}")
     print(f"📊 计划运行次数: {runs}")
     print(f"🏭 行业: {industry}")
     print(f"🏭 行业: {industry}")
     print(f"📁 数据文件: {data_file}")
     print(f"📁 数据文件: {data_file}")
     print(f"❓ 查询: {question}")
     print(f"❓ 查询: {question}")
+    print(f"LLM模型名:{LLM_MODEL_NAME}")
     print(f"{'='*80}")
     print(f"{'='*80}")
 
 
-    # 检查API密钥
-    if not config.DEEPSEEK_API_KEY:
-        print("❌ 未找到API密钥,请检查config.py")
-        return
-
-
-
     # 运行结果统计
     # 运行结果统计
     successful_runs = 0
     successful_runs = 0
     failed_runs = 0
     failed_runs = 0