Class DocumentParserExtensionsKt
-
- All Implemented Interfaces:
public final class DocumentParserExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static DocumentparseAsync(DocumentParser $self, DocumentSource source, CoroutineContext context)Asynchronously parses a document from the specified document source using the given coroutine context. final static DocumentparseAsync(DocumentParser $self, InputStream input, CoroutineContext context)Asynchronously parses a document from the provided input stream using the specified dispatcher. -
-
Method Detail
-
parseAsync
final static Document parseAsync(DocumentParser $self, DocumentSource source, CoroutineContext context)
Asynchronously parses a document from the specified document source using the given coroutine context.
- Parameters:
source- The dev.langchain4j.data.document.DocumentSource from which the document will be parsed.context- The CoroutineContext to use for asynchronous execution, defaults to Dispatchers.IO.- Returns:
The parsed dev.langchain4j.data.document.Document, potentially with merged metadata from the document source.
-
parseAsync
final static Document parseAsync(DocumentParser $self, InputStream input, CoroutineContext context)
Asynchronously parses a document from the provided input stream using the specified dispatcher.
- Parameters:
input- The InputStream from which the document will be parsed.context- The CoroutineContext to use for asynchronous execution, defaults to[Dispatchers.IO].- Returns:
The parsed Document.
-
-
-
-