AS AgentScopeAPI 手册 / API Reference

RetrieveConfig

@Deprecated(forRemoval = true, since = "2.0.0") public class RetrieveConfig
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:31–180

检索配置,保存相关配置项。位于 io.agentscope.core.rag.model 包。核心成员包括 getLimit、getScoreThreshold、getVectorName、getConversationHistory、mutate、builder。

Configuration for document retrieval operations.

This class uses the builder pattern to configure retrieval parameters such as the maximum number of results, the minimum similarity score threshold, and optional conversation history for context-aware retrieval.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
RetrieveConfig的构建器。
Builder for RetrieveConfig.

方法摘要Method Summary

方法Method说明Description
public int getLimit()
获取限制。
Gets the maximum number of documents to retrieve.
public double getScoreThreshold()
获取分数阈值。
Gets the minimum similarity score threshold.
public String getVectorName()
获取向量名称用于检索。
Gets the vector name for retrieval.
public List<Msg> getConversationHistory()
获取会话历史。
Gets the conversation history for context-aware retrieval.
public Builder mutate()
返回 `mutate` 结果。
Mutate the current instance to a new builder.
public static Builder builder()
static
创建新的构建器实例。
Creates a new builder instance.

方法详情Method Detail

getLimit

public int getLimit()

获取限制。

Gets the maximum number of documents to retrieve.

返回Returns int
限制。the limit
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:51–53

getScoreThreshold

public double getScoreThreshold()

获取分数阈值。

Gets the minimum similarity score threshold.

返回Returns double
分数阈值。the score threshold
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:60–62

getVectorName

public String getVectorName()

获取向量名称用于检索。

Gets the vector name for retrieval.

返回Returns String
返回字符串结果。the vector name, or null if not set
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:69–71

getConversationHistory

public List<Msg> getConversationHistory()

获取会话历史。

Gets the conversation history for context-aware retrieval.

返回Returns List<Msg>
返回列出。the conversation history, or null if not set
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:81–83

mutate

public Builder mutate()

返回 mutate 结果。

Mutate the current instance to a new builder.

返回Returns Builder
返回当前实例,以支持链式调用。a new builder with the same values of this instance
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:90–96

builder

public static Builder builder()
static

创建新的构建器实例。

Creates a new builder instance.

返回Returns Builder
一种新的构建器。a new builder
源码Source io/agentscope/core/rag/model/RetrieveConfig.java:103–105

嵌套类详情Nested Class Detail

Builder

public static class Builder

RetrieveConfig的构建器。位于 io.agentscope.core.rag.model 包。核心成员包括 limit、scoreThreshold、vectorName、conversationHistory、build。

Builder for RetrieveConfig.

基于官方固定版本源码静态生成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.