Package com.alibaba.cloud.ai.document
Interface DocumentParser
- All Known Implementing Classes:
JsonDocumentParser,TextDocumentParser
public interface DocumentParser
- Since:
- 2024-12-02 11:25
- Author:
- HeYQ
-
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.ai.document.Document>parse(InputStream inputStream) Parses a givenInputStreaminto aDocument.
-
Method Details
-
parse
Parses a givenInputStreaminto aDocument. 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- TheInputStreamthat contains the content of theDocument.- Returns:
- The parsed
Document.
-