Class RAGFlowDocumentConverter

java.lang.Object
io.agentscope.core.rag.integration.ragflow.RAGFlowDocumentConverter

public class RAGFlowDocumentConverter extends Object
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 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

      public static io.agentscope.core.rag.model.Document convertToDocument(RAGFlowChunk chunk)
      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