async def get_db() -> AsyncGenerator[AsyncSession, None]:
    """Yield an async database session to be used in dependency injection.

    Yields:
    ------
        AsyncSession: An async database session

    """
    async with AsyncSessionLocal() as db:
        try:
            yield db
        finally:
            await db.close()
Yield an async database session to be used in dependency injection.

    Yields:
    ------
        AsyncSession: An async database session

    
backend/airweave/db/session.py