def summarize_text(text: str, client) -> str:
    """
    Generate a summary of the given text using AIClient.

    Parameters:
        text (str): Text to summarize.
        client (AIClient): Instance of AIClient.

    Returns:
        str: Summarized version of the input text.
    """
    prompt = f"Summarize this:\n{text}"
    return client.get_response(prompt)


def format_response(text: str) -> str:
    """
    Clean and format AI-generated response text.

    Parameters:
        text (str): Raw AI response.

    Returns:
        str: Cleaned response text.
    """
    return text.strip()