增加代码知识库;修复文档处理内容;增加API设置
This commit is contained in:
@@ -34,6 +34,7 @@ from app.services.srs_job_service import (
|
||||
replace_requirements,
|
||||
run_srs_job,
|
||||
)
|
||||
from app.services.model_config import ModelConfigService
|
||||
from app.services.testing_generation_service import (
|
||||
build_testing_generation_response,
|
||||
create_testing_generation,
|
||||
@@ -72,6 +73,11 @@ async def create_srs_job(
|
||||
if ext not in ALLOWED_EXTENSIONS:
|
||||
raise HTTPException(status_code=400, detail="仅支持 .pdf/.docx 文件")
|
||||
|
||||
try:
|
||||
ModelConfigService.require_active_config(db, current_user.id)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
job = ToolJob(
|
||||
user_id=current_user.id,
|
||||
tool_name="srs.requirement_extractor",
|
||||
|
||||
Reference in New Issue
Block a user