- 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>
16 lines
447 B
Python
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": []}
|