async def send_message(
    *,
    db: AsyncSession = Depends(get_db),
    chat_id: UUID,
    message: schemas.ChatMessageCreate,
    user: schemas.User = Depends(get_user),
) -> schemas.ChatMessage:
    """Send a message to a chat.

    Args:
    -----
        db: The database session.
        chat_id: The ID of the chat to send the message to.
        message: The message to send.
        user: The current user.

    Returns:
    -------
        schemas.ChatMessage: The sent message.
    """
    return await crud.chat.add_message(db=db, chat_id=chat_id, obj_in=message, current_user=user)
Send a message to a chat.

    Args:
    -----
        db: The database session.
        chat_id: The ID of the chat to send the message to.
        message: The message to send.
        user: The current user.

    Returns:
    -------
        schemas.ChatMessage: The sent message.
    
backend/airweave/api/v1/endpoints/chat.py