AS AgentScopeAPI 手册 / API Reference

RAGFlowClient

public class RAGFlowClient
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowClient.java:48–397

用于RAGFlow API的HTTP 客户端。位于 io.agentscope.core.rag.integration.ragflow 包。核心成员包括 retrieve、RAGFlowClient。

HTTP client for RAGFlow API.

This client handles all HTTP communication with RAGFlow service, including:

  • Knowledge retrieval

  • Authentication

  • Error handling and retry logic

构造器摘要Constructor Summary

构造器Constructor说明Description
public RAGFlowClient(RAGFlowConfig config)
初始化 `RAGFlowClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<RAGFlowResponse> retrieve(String question, Integer topK, Double similarityThreshold, Map<String, Object> metadataCondition)
按查询检索相关文档。
Retrieve documents from RAGFlow knowledge base.

构造器详情Constructor Detail

RAGFlowClient

public RAGFlowClient(RAGFlowConfig config)

初始化 RAGFlowClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
configRAGFlowConfig配置对象(类型 `RAGFlowConfig`)。The config.
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowClient.java:58–61

方法详情Method Detail

retrieve

public Mono<RAGFlowResponse> retrieve(String question, Integer topK, Double similarityThreshold, Map<String, Object> metadataCondition)

按查询检索相关文档。

Retrieve documents from RAGFlow knowledge base.

参数Parameters
名称Name类型Type说明Description
questionString查询文本(必填)。the query text (required)
topKIntegertop K(类型 `Integer`)。the number of documents to retrieve (optional, defaults to config value)
similarityThresholdDoublesimilarity 阈值(类型 `Double`)。the minimum similarity threshold (optional, defaults to config value)
metadataConditionMap<String, Object>元数据 Condition(类型 `Map`)。metadata filtering conditions (optional)
返回Returns Mono<RAGFlowResponse>
返回Mono。a Mono emitting the retrieval response
源码Source io/agentscope/core/rag/integration/ragflow/RAGFlowClient.java:99–263
基于官方固定版本源码静态生成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.