针对测试用例生成添加了常用测试方法;更新了需求提取工具

This commit is contained in:
2026-04-18 21:13:33 +08:00
parent c7c0659a85
commit 0c2ed67e2a
21 changed files with 2029 additions and 481 deletions

View File

@@ -55,6 +55,9 @@ class SRSTool:
ToolRegistry.register(self.DEFINITION)
def run(self, file_path: str, enable_llm: bool = True) -> Dict[str, Any]:
if not enable_llm:
raise ValueError("当前版本仅支持LLM模式请将 enable_llm 设为 true")
config = self._load_config()
llm = self._build_llm(config, enable_llm=enable_llm)
@@ -122,12 +125,12 @@ class SRSTool:
def _build_llm(self, config: Dict[str, Any], enable_llm: bool) -> QwenLLM | None:
if not enable_llm:
return None
raise ValueError("当前版本仅支持LLM模式")
llm_cfg = config.get("llm", {})
api_key = llm_cfg.get("api_key")
if not api_key:
return None
raise ValueError("未配置API密钥请设置 DASH_SCOPE_API_KEY 或 DASHSCOPE_API_KEY")
return QwenLLM(
api_key=api_key,