RetrieveConfig
@Deprecated(forRemoval = true, since = "2.0.0") public class RetrieveConfig
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.
intio/agentscope/core/rag/model/RetrieveConfig.java:51–53getScoreThreshold
public double getScoreThreshold()
获取分数阈值。
Gets the minimum similarity score threshold.
doubleio/agentscope/core/rag/model/RetrieveConfig.java:60–62getVectorName
public String getVectorName()
获取向量名称用于检索。
Gets the vector name for retrieval.
Stringio/agentscope/core/rag/model/RetrieveConfig.java:69–71getConversationHistory
public List<Msg> getConversationHistory()
获取会话历史。
Gets the conversation history for context-aware retrieval.
List<Msg>io/agentscope/core/rag/model/RetrieveConfig.java:81–83mutate
public Builder mutate()
返回 mutate 结果。
Mutate the current instance to a new builder.
Builderio/agentscope/core/rag/model/RetrieveConfig.java:90–96builder
public static Builder builder()
创建新的构建器实例。
Creates a new builder instance.
Builderio/agentscope/core/rag/model/RetrieveConfig.java:103–105嵌套类详情Nested Class Detail
Builder
public static class BuilderRetrieveConfig的构建器。位于 io.agentscope.core.rag.model 包。核心成员包括 limit、scoreThreshold、vectorName、conversationHistory、build。
Builder for RetrieveConfig.