feat: AI 서비스 MLX 듀얼 백엔드 및 모델 최적화
- MLX(맥미니 27B) 우선 → Ollama(조립컴 9B) fallback 구조 - pydantic-settings 기반 config 전환 - health check에 MLX 상태 추가 - 텍스트 모델 qwen3:8b → qwen3.5:9b-q8_0 변경 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from fastapi import APIRouter
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from pydantic import BaseModel
|
||||
from services.classification_service import (
|
||||
classify_issue,
|
||||
@@ -26,7 +26,7 @@ async def classify(req: ClassifyRequest):
|
||||
result = await classify_issue(req.description, req.detail_notes)
|
||||
return {"available": True, **result}
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
|
||||
@router.post("/summarize")
|
||||
@@ -35,7 +35,7 @@ async def summarize(req: SummarizeRequest):
|
||||
result = await summarize_issue(req.description, req.detail_notes, req.solution)
|
||||
return {"available": True, **result}
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
|
||||
@router.post("/classify-and-summarize")
|
||||
@@ -44,4 +44,4 @@ async def classify_and_summarize_endpoint(req: ClassifyRequest):
|
||||
result = await classify_and_summarize(req.description, req.detail_notes)
|
||||
return {"available": True, **result}
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
Reference in New Issue
Block a user