针对测试用例生成添加了常用测试方法;更新了需求提取工具
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user