HayStackConfig
public class HayStackConfig
io/agentscope/core/rag/integration/haystack/HayStackConfig.java:33–460Hay Stack 配置,保存相关配置项。位于 io.agentscope.core.rag.integration.haystack 包。核心成员包括 builder、getBaseUrl、getSuccessCode、getTopK、getScaleScore、getReturnEmbedding。
Configuration for HayStack integration.
This class holds the configuration for connecting to HayStack service, including endpoint, and retrieval parameters.
API Reference: This configuration is designed to work with HayStack RAG's retrieval API.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.core.rag.integration.haystack that turns private documents into retrievable knowledge. |
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
DEFAULT_SUCCESS_CODEstaticfinal | int | 默认成功 CODE字段。 The DEFAULT SUCCESS CODE field. |
方法摘要Method Summary
字段详情Field Detail
DEFAULT_SUCCESS_CODE
public static final int DEFAULT_SUCCESS_CODE
默认成功 CODE字段。声明为 public static final int DEFAULT_SUCCESS_CODE。
The DEFAULT SUCCESS CODE field.
io/agentscope/core/rag/integration/haystack/HayStackConfig.java:37方法详情Method Detail
builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/core/rag/integration/haystack/HayStackConfig.java:103–105getBaseUrl
public String getBaseUrl()
获取基类 URL。
Returns the base url.
Stringio/agentscope/core/rag/integration/haystack/HayStackConfig.java:107–109getSuccessCode
public Integer getSuccessCode()
获取 getSuccessCode。
Returns the success code.
Integerio/agentscope/core/rag/integration/haystack/HayStackConfig.java:111–113getTopK
public Integer getTopK()
获取 getTopK。
Returns the top k.
Integerio/agentscope/core/rag/integration/haystack/HayStackConfig.java:115–117getScaleScore
public Boolean getScaleScore()
获取 getScaleScore。
Returns the scale score.
Booleanio/agentscope/core/rag/integration/haystack/HayStackConfig.java:119–121getReturnEmbedding
public Boolean getReturnEmbedding()
获取 getReturnEmbedding。
Returns the return embedding.
Booleanio/agentscope/core/rag/integration/haystack/HayStackConfig.java:123–125getScoreThreshold
public Double getScoreThreshold()
获取分数阈值。
Returns the score threshold.
Doubleio/agentscope/core/rag/integration/haystack/HayStackConfig.java:127–129getGroupBy
public String getGroupBy()
获取组通过。
Returns the group by.
Stringio/agentscope/core/rag/integration/haystack/HayStackConfig.java:131–133getGroupSize
public Integer getGroupSize()
获取组大小。
Returns the group size.
Integerio/agentscope/core/rag/integration/haystack/HayStackConfig.java:135–137getQueryEmbedding
public List<Float> getQueryEmbedding()
获取查询向量化。
Returns the query embedding.
List<Float>io/agentscope/core/rag/integration/haystack/HayStackConfig.java:139–141getQuerySparseEmbedding
public SparseEmbedding getQuerySparseEmbedding()
获取 getQuerySparseEmbedding。
Returns the query sparse embedding.
SparseEmbeddingio/agentscope/core/rag/integration/haystack/HayStackConfig.java:143–145getDocuments
public List<HayStackDocument> getDocuments()
获取文档。
Returns the documents.
List<HayStackDocument>io/agentscope/core/rag/integration/haystack/HayStackConfig.java:147–149getRetrievedDocuments
public List<HayStackDocument> getRetrievedDocuments()
获取 getRetrievedDocuments。
Returns the retrieved documents.
List<HayStackDocument>io/agentscope/core/rag/integration/haystack/HayStackConfig.java:151–153getWindowSize
public Integer getWindowSize()
获取 getWindowSize。
Returns the window size.
Integerio/agentscope/core/rag/integration/haystack/HayStackConfig.java:155–157getFilters
public Map<String, Object> getFilters()
获取 getFilters。
Returns the filters.
Map<String, Object>io/agentscope/core/rag/integration/haystack/HayStackConfig.java:159–161getFilterPolicy
public FilterPolicy getFilterPolicy()
获取过滤策略。
Returns the filter policy.
FilterPolicyio/agentscope/core/rag/integration/haystack/HayStackConfig.java:163–165getTimeout
public Duration getTimeout()
获取超时。
Returns the timeout.
Durationio/agentscope/core/rag/integration/haystack/HayStackConfig.java:167–169getMaxRetries
public Integer getMaxRetries()
获取最大重试。
Returns the max retries.
Integerio/agentscope/core/rag/integration/haystack/HayStackConfig.java:171–173getCustomHeaders
public Map<String, String> getCustomHeaders()
获取自定义请求头。
Returns the custom headers.
Map<String, String>io/agentscope/core/rag/integration/haystack/HayStackConfig.java:175–177嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.core.rag.integration.haystack 包。核心成员包括 baseUrl、successCode、topK、scaleScore、returnEmbedding、scoreThreshold。
A class in io.agentscope.core.rag.integration.haystack that turns private documents into retrievable knowledge. Declared in io.agentscope.core.rag.integration.haystack.