huesoporro/src/huesoporro/svc/get_chatbot_settings.py

11 lines
320 B
Python

from pydantic import BaseModel
from src.huesoporro.infra.db import Database
from src.huesoporro.models import ChatbotSettings, User
class ChatbotSettingsGetterSvc(BaseModel):
db: Database
async def run(self, user: User) -> ChatbotSettings | None:
return await self.db.get_chatbot_settings(user=user)