AS AgentScopeAPI 手册 / API Reference

HayStackDocumentConverter

public class HayStackDocumentConverter
源码Source io/agentscope/core/rag/integration/haystack/HayStackDocumentConverter.java:38–166

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

Converter for transforming HayStack API responses to AgentScope Document objects.

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

方法摘要Method Summary

方法Method说明Description
public static List<Document> convertToDocuments(List<HayStackDocument> hayStackDocuments)
static
转换列出的HayStackDocuments 到文档。
Converts a list of HayStackDocuments to Documents.
public static Document convertToDocument(HayStackDocument hayStackDocument)
static
转换到文档。
Converts a single HayStack chunk to a Document.

方法详情Method Detail

convertToDocuments

public static List<Document> convertToDocuments(List<HayStackDocument> hayStackDocuments)
static

转换列出的HayStackDocuments 到文档。

Converts a list of HayStackDocuments to Documents.

参数Parameters
名称Name类型Type说明Description
hayStackDocumentsList<HayStackDocument>hayStackDocuments 来自检索响应。the hayStackDocuments from retrieve response
返回Returns List<Document>
返回列出。a list of Document objects
源码Source io/agentscope/core/rag/integration/haystack/HayStackDocumentConverter.java:52–71

convertToDocument

public static Document convertToDocument(HayStackDocument hayStackDocument)
static

转换到文档。

Converts a single HayStack chunk to a Document.

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