Files
life-echo/api/app/features/memoir/deps.py
2026-03-20 15:15:35 +08:00

22 lines
820 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Memoir feature dependencies: get_memoir_service注入 MemoryService 供章节生成使用 evidence"""
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.db import get_async_db
from app.core.dependencies import get_object_storage
from app.features.memoir.service import MemoirService
from app.features.memory.deps import get_memory_service
from app.features.memory.service import MemoryService
from app.ports.storage import ObjectStorage
def get_memoir_service(
db: AsyncSession = Depends(get_async_db),
memory_service: MemoryService = Depends(get_memory_service),
object_storage: ObjectStorage = Depends(get_object_storage),
) -> MemoirService:
return MemoirService(
db=db, memory_service=memory_service, object_storage=object_storage
)