zioinfo-mail/workspace/guardia-manager/backend/routers/llm.py
DESKTOP-TKLFCPR\ython cfe2901a55 refactor(structure): consolidate all projects under workspace/
- itsm/    -> workspace/guardia-itsm/
- manager/ -> workspace/guardia-manager/
- app/     -> workspace/guardia-messenger/
- manual/  -> workspace/guardia-docs/

workspace/zioinfo-web/ unchanged.
git mv preserves full commit history.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 23:50:56 +09:00

16 lines
447 B
Python

import httpx, os
from fastapi import APIRouter, Depends
from core.auth import verify_token
router = APIRouter()
OLLAMA = os.environ.get("OLLAMA_URL", "http://localhost:11434")
@router.get("/models")
async def models(_=Depends(verify_token)):
async with httpx.AsyncClient() as c:
try:
r = await c.get(f"{OLLAMA}/api/tags", timeout=5)
return r.json()
except Exception:
return {"models": []}