haive.agents.document_modifiers.base.utils ========================================== .. py:module:: haive.agents.document_modifiers.base.utils .. autoapi-nested-parse:: Utility functions for document processing. Functions --------- .. autoapisummary:: haive.agents.document_modifiers.base.utils.documents_to_strings haive.agents.document_modifiers.base.utils.normalize_contents haive.agents.document_modifiers.base.utils.strings_to_documents Module Contents --------------- .. py:function:: documents_to_strings(documents) Convert a list of Documents to a list of strings. .. py:function:: normalize_contents(contents) Normalize inputs to strings. Accepts: - List[str] - List[Document] - Mixed list of strings and documents - Single string or Document :param contents: The content to normalize :returns: List of strings extracted from the input :raises TypeError: If unsupported content type is encountered .. py:function:: strings_to_documents(strings) Convert a list of strings to a list of Documents.