AS AgentScopeAPI 手册 / API Reference

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
inputReaderInput输入消息(类型 `ReaderInput`)。the input to read (text, file path, URL, etc.)
返回Returns 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:39

getSupportedFormats

public List<String> getSupportedFormats()

获取 getSupportedFormats。

Gets the list of file formats supported by this reader.

返回Returns List<String>
返回列出。a list of supported file extensions (e.g., "txt", "md", "pdf")
源码Source io/agentscope/core/rag/reader/Reader.java:46
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.