Class RAGFlowDocumentConverter
java.lang.Object
io.agentscope.core.rag.integration.ragflow.RAGFlowDocumentConverter
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
Modifier and TypeMethodDescriptionstatic io.agentscope.core.rag.model.DocumentconvertToDocument(RAGFlowChunk chunk) Converts a single RAGFlow chunk to a Document.static List<io.agentscope.core.rag.model.Document>convertToDocuments(List<RAGFlowChunk> chunks) Converts a list of RAGFlow chunks to Documents.
-
Method Details
-
convertToDocuments
public static List<io.agentscope.core.rag.model.Document> convertToDocuments(List<RAGFlowChunk> chunks) Converts a list of RAGFlow chunks to Documents.- Parameters:
chunks- the RAGFlow chunks from retrieve response- Returns:
- a list of Document objects
-
convertToDocument
Converts a single RAGFlow chunk to a Document.- Parameters:
chunk- the RAGFlow chunk from retrieve response- Returns:
- a Document object, or null if conversion fails
-