17 lines
587 B
Python
17 lines
587 B
Python
|
|
"""Conversation feature dependencies: get_conversation_service."""
|
||
|
|
|
||
|
|
from fastapi import Depends
|
||
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||
|
|
|
||
|
|
from app.core.db import get_async_db
|
||
|
|
from app.features.conversation.service import ConversationService
|
||
|
|
from app.features.quota.deps import get_quota_service
|
||
|
|
from app.features.quota.service import QuotaService
|
||
|
|
|
||
|
|
|
||
|
|
def get_conversation_service(
|
||
|
|
db: AsyncSession = Depends(get_async_db),
|
||
|
|
quota_service: QuotaService = Depends(get_quota_service),
|
||
|
|
) -> ConversationService:
|
||
|
|
return ConversationService(db=db, quota_service=quota_service)
|