类 RetrieveConfig.Builder
java.lang.Object
io.agentscope.core.rag.model.RetrieveConfig.Builder
- 封闭类:
RetrieveConfig
Builder for RetrieveConfig.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds the RetrieveConfig instance.conversationHistory(List<Msg> conversationHistory) Sets the conversation history for context-aware retrieval.limit(int limit) Sets the maximum number of documents to retrieve.scoreThreshold(double scoreThreshold) Sets the minimum similarity score threshold.vectorName(String vectorName) Sets the vector name for retrieval.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
limit
Sets the maximum number of documents to retrieve.- 参数:
limit- the limit (must be positive)- 返回:
- this builder for chaining
-
scoreThreshold
Sets the minimum similarity score threshold.- 参数:
scoreThreshold- the score threshold (must be between 0.0 and 1.0)- 返回:
- this builder for chaining
-
vectorName
Sets the vector name for retrieval.- 参数:
vectorName- the vector name (can be null)- 返回:
- this builder for chaining
-
conversationHistory
Sets the conversation history for context-aware retrieval.This is an optional parameter used by knowledge bases that support multi-turn conversation context. When provided, the knowledge base may use this history to rewrite or contextualize the query for better retrieval results.
- 参数:
conversationHistory- the conversation history (can be null)- 返回:
- this builder for chaining
-
build
Builds the RetrieveConfig instance.- 返回:
- the configured RetrieveConfig
-