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.rag_service import (
|
||||
rag_suggest_solution,
|
||||
@@ -30,7 +30,7 @@ async def suggest_solution(issue_id: int):
|
||||
try:
|
||||
return await rag_suggest_solution(issue_id)
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
|
||||
@router.post("/rag/ask")
|
||||
@@ -38,7 +38,7 @@ async def ask_question(req: AskRequest):
|
||||
try:
|
||||
return await rag_ask(req.question, req.project_id)
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
|
||||
@router.post("/rag/pattern")
|
||||
@@ -46,7 +46,7 @@ async def analyze_pattern(req: PatternRequest):
|
||||
try:
|
||||
return await rag_analyze_pattern(req.description, req.n_results)
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
|
||||
@router.post("/rag/classify")
|
||||
@@ -54,4 +54,4 @@ async def classify_with_rag(req: ClassifyRequest):
|
||||
try:
|
||||
return await rag_classify_with_context(req.description, req.detail_notes)
|
||||
except Exception as e:
|
||||
return {"available": False, "error": str(e)}
|
||||
raise HTTPException(status_code=500, detail="AI 서비스 처리 중 오류가 발생했습니다")
|
||||
|
||||
Reference in New Issue
Block a user