from fastapi import APIRouter, Depends
from app.api import Response, get_current_user
from app.models.base_model import get_db
from app.models.user_model import UserModel
from app.service.llm import get_llm_list


llm_router = APIRouter()


@llm_router.get("/list", response_model=Response)
async def llm_list(
        db=Depends(get_db),
        current_user: UserModel = Depends(get_current_user),
):
    getllmlist = await get_llm_list(db, current_user.id)
    return Response(code=200, msg="", data=getllmlist)
