19 lines
538 B
Python
19 lines
538 B
Python
from __future__ import annotations
|
|
|
|
from typing import Annotated
|
|
|
|
from fastapi import Depends
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
|
|
from core.auth.models import CurrentUser
|
|
from core.db import get_db
|
|
from v1.agent.service import AgentChatService
|
|
from v1.profile.dependencies import get_current_user
|
|
|
|
|
|
def get_agent_service(
|
|
session: Annotated[AsyncSession, Depends(get_db)],
|
|
user: Annotated[CurrentUser, Depends(get_current_user)],
|
|
) -> AgentChatService:
|
|
return AgentChatService(session=session, current_user=user)
|