Package dev.langchain4j.data.document
Interface DocumentParser
-
- All Implemented Interfaces:
public interface DocumentParser
Defines the interface for parsing an InputStream into a Document. Different document types require specialized parsing logic.
-
-
Method Summary
Modifier and Type Method Description abstract Document
parse(InputStream inputStream)
Parses a given InputStream into a Document. -
-
Method Detail
-
parse
abstract Document parse(InputStream inputStream)
Parses a given InputStream into a Document. The specific implementation of this method will depend on the type of the document being parsed.
Note: This method does not close the provided InputStream - it is the caller's responsibility to manage the lifecycle of the stream.
- Parameters:
inputStream
- The InputStream that contains the content of the Document.- Returns:
The parsed Document.
-
-
-
-