refactor: move entities

This commit is contained in:
Junyan Qin
2025-03-10 22:34:45 +08:00
parent a0fd152d19
commit c1f4de425a
14 changed files with 105 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
import quart
from .. import group
from .....entity.persistence import model
@group.group_class('models/llm', '/api/v1/provider/models/llm')
class LLMModelsRouterGroup(group.RouterGroup):
async def initialize(self) -> None:
@self.route('', methods=['GET', 'POST'])
async def _() -> str:
if quart.request.method == 'GET':
return self.success(data={
'models': await self.ap.model_service.get_llm_models()
})
elif quart.request.method == 'POST':
pass
@self.route('/<model_uuid>', methods=['GET', 'PUT', 'DELETE'])
async def _(model_uuid: str) -> str:
if quart.request.method == 'GET':
pass
elif quart.request.method == 'PUT':
pass
elif quart.request.method == 'DELETE':
pass

View File

@@ -3,7 +3,7 @@ import sqlalchemy
import argon2
from .. import group
from .....persistence.entities import user
from .....entity.persistence import user
@group.group_class('user', '/api/v1/user')