feat: ai-service를 ds923에서 맥미니로 이전

- ChromaDB → Qdrant 전환 (맥미니 기존 인스턴스, tk_qc_issues 컬렉션)
- Ollama 임베딩/텍스트 생성 URL 분리 (임베딩: 맥미니, 텍스트: GPU서버)
- MLX fallback 제거, Ollama 단일 경로로 단순화
- ds923 docker-compose에서 ai-service 제거
- gateway/system3-web nginx: ai-service 프록시를 ai.hyungi.net 경유로 변경
- resolver + 변수 기반 proxy_pass로 런타임 DNS 해석 (컨테이너 시작 실패 방지)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-11 15:07:58 +09:00
parent 2d25d54589
commit 85f674c9cb
9 changed files with 125 additions and 130 deletions

View File

@@ -10,20 +10,18 @@ async def health_check():
backends = await ollama_client.check_health()
stats = vector_store.stats()
# 메인 텍스트 모델명 결정 (Ollama 메인, MLX fallback)
# 메인 텍스트 모델명 결정
model_name = None
ollama_models = backends.get("ollama", {}).get("models", [])
if ollama_models:
model_name = ollama_models[0]
if not model_name and backends.get("mlx", {}).get("status") == "connected":
model_name = backends["mlx"].get("model")
text_models = backends.get("ollama_text", {}).get("models", [])
if text_models:
model_name = text_models[0]
return {
"status": "ok",
"service": "tk-ai-service",
"model": model_name,
"ollama": backends.get("ollama", {}),
"mlx": backends.get("mlx", {}),
"ollama_text": backends.get("ollama_text", {}),
"ollama_embed": backends.get("ollama_embed", {}),
"embeddings": stats,
}