Reader
public interface Reader
源码Source
io/agentscope/core/rag/reader/Reader.java:29–47定义读取器契约的接口。位于 io.agentscope.core.rag.reader 包。核心成员包括 read、getSupportedFormats。
Interface for document readers.
This interface provides a unified API for reading various types of documents and chunking them into Document objects. Implementations should support different file formats and input sources.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<List<Document>> read(ReaderInput input) | 设置读取。 Reads a document and returns a list of chunked Document objects. |
public List<String> getSupportedFormats() | 获取 `getSupportedFormats`。 Gets the list of file formats supported by this reader. |
方法详情Method Detail
read
public Mono<List<Document>> read(ReaderInput input)
设置读取。
Reads a document and returns a list of chunked Document objects.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | ReaderInput | 输入消息(类型 `ReaderInput`)。the input to read (text, file path, URL, etc.) |
Mono<List<Document>>返回Mono>。a Mono that emits a list of Document objects, or an error signal on failure
源码Source
io/agentscope/core/rag/reader/Reader.java:39getSupportedFormats
public List<String> getSupportedFormats()
获取 getSupportedFormats。
Gets the list of file formats supported by this reader.
List<String>返回列出。a list of supported file extensions (e.g., "txt", "md", "pdf")
源码Source
io/agentscope/core/rag/reader/Reader.java:46