fix: remove "Let AI Decide" option from KB Accelerator upload

The uploader should know their content type — auto-detection adds
complexity and currently just defaults to troubleshooting anyway.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-11 22:56:40 -04:00
parent 963c0da10a
commit fe3c651115
3 changed files with 10 additions and 15 deletions

View File

@@ -288,11 +288,11 @@ async def upload_kb_article(
else:
raise HTTPException(status_code=400, detail="Provide either a file or content text.")
# Validate target_type
if target_type and target_type not in ("troubleshooting", "procedural"):
raise HTTPException(status_code=400, detail="target_type must be 'troubleshooting' or 'procedural'.")
# Validate target_type (required — frontend must specify)
if not target_type:
target_type = "troubleshooting" # Default; Phase 2 adds "let AI decide"
target_type = "troubleshooting"
if target_type not in ("troubleshooting", "procedural"):
raise HTTPException(status_code=400, detail="target_type must be 'troubleshooting' or 'procedural'.")
# Create KB import record
kb_import = KBImport(