def read_file()

in src/epam/auto_llm_eval/evaluator.py [0:0]


def read_file(file_path: str) -> str:
    """
    Read the content of a file and return it as a string.

    This function opens the specified file, reads its entire content,
    and returns it as a string. It uses UTF-8 encoding to handle
    various character sets.

    Args:
        file_path (str): The path to the file to be read.

    Returns:
        str: The content of the file as a string.

    Raises:
        FileNotFoundError: If the specified file does not exist.
        IOError: If there's an error reading the file.
    """
    with open(file_path, "r", encoding="utf-8") as f:
        content = f.read()
    return content