swarmauri.core.parsers.IParser module

class swarmauri.core.parsers.IParser.IParser[source]

Bases: ABC

Abstract base class for parsers. It defines a public method to parse input data (str or Message) into documents, and relies on subclasses to implement the specific parsing logic through protected and private methods.

abstract parse(data)[source]

Public method to parse input data (either a str or a Message) into a list of Document instances.

This method leverages the abstract _parse_data method which must be implemented by subclasses to define specific parsing logic.

Return type:

List[IDocument]