AS AgentScopeAPI 手册 / API Reference

RAGFlowDocumentConverter

public class RAGFlowDocumentConverter
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:36–198

RAG Flow 文档转换器,把私有文档转化为可检索的知识。位于 io.agentscope.core.rag.integration.ragflow 包。核心成员包括 convertToDocuments、convertToDocument。

Converter for transforming RAGFlow API responses to AgentScope Document objects.

This class handles the conversion between RAGFlow's chunk format and AgentScope's internal Document representation, ensuring seamless integration with the RAG system.

方法摘要Method Summary

方法Method说明Description
public static List<Document> convertToDocuments(List<RAGFlowChunk> chunks)
static
转换到文档。
Converts a list of RAGFlow chunks to Documents.
public static Document convertToDocument(RAGFlowChunk chunk)
static
转换到文档。
Converts a single RAGFlow chunk to a Document.

方法详情Method Detail

convertToDocuments

public static List<Document> convertToDocuments(List<RAGFlowChunk> chunks)
static

转换到文档。

Converts a list of RAGFlow chunks to Documents.

参数Parameters
名称Name类型Type说明Description
chunksList<RAGFlowChunk>分块列表(类型 `List`)。the RAGFlow chunks from retrieve response
返回Returns List<Document>
返回列出。a list of Document objects
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:50–63

convertToDocument

public static Document convertToDocument(RAGFlowChunk chunk)
static

转换到文档。

Converts a single RAGFlow chunk to a Document.

参数Parameters
名称Name类型Type说明Description
chunkRAGFlowChunkRAGFlow 分块来自检索响应。the RAGFlow chunk from retrieve response
返回Returns Document
返回文档。a Document object, or null if conversion fails
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:71–125
基于官方固定版本源码静态生成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.