RAGFlowDocumentConverter
public class RAGFlowDocumentConverter
源码Source
io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:36–198RAG 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 |
|---|---|---|
chunks | List<RAGFlowChunk> | 分块列表(类型 `List`)。the RAGFlow chunks from retrieve response |
List<Document>返回列出。a list of Document objects
源码Source
io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:50–63convertToDocument
public static Document convertToDocument(RAGFlowChunk chunk)
static
转换到文档。
Converts a single RAGFlow chunk to a Document.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
chunk | RAGFlowChunk | RAGFlow 分块来自检索响应。the RAGFlow chunk from retrieve response |
Document返回文档。a Document object, or null if conversion fails
源码Source
io/agentscope/core/rag/integration/ragflow/RAGFlowDocumentConverter.java:71–125