AS AgentScopeAPI 手册 / API Reference

HayStackConfig

public class HayStackConfig
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:33–460

Hay 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_CODE
staticfinal
int
默认成功 CODE字段。
The DEFAULT SUCCESS CODE field.

方法摘要Method Summary

方法Method说明Description
public static Builder builder()
static
返回构建器实例。
Returns the builder.
public String getBaseUrl()
获取基类 URL。
Returns the base url.
public Integer getSuccessCode()
获取 `getSuccessCode`。
Returns the success code.
public Integer getTopK()
获取 `getTopK`。
Returns the top k.
public Boolean getScaleScore()
获取 `getScaleScore`。
Returns the scale score.
public Boolean getReturnEmbedding()
获取 `getReturnEmbedding`。
Returns the return embedding.
public Double getScoreThreshold()
获取分数阈值。
Returns the score threshold.
public String getGroupBy()
获取组通过。
Returns the group by.
public Integer getGroupSize()
获取组大小。
Returns the group size.
public List<Float> getQueryEmbedding()
获取查询向量化。
Returns the query embedding.
public SparseEmbedding getQuerySparseEmbedding()
获取 `getQuerySparseEmbedding`。
Returns the query sparse embedding.
public List<HayStackDocument> getDocuments()
获取文档。
Returns the documents.
public List<HayStackDocument> getRetrievedDocuments()
获取 `getRetrievedDocuments`。
Returns the retrieved documents.
public Integer getWindowSize()
获取 `getWindowSize`。
Returns the window size.
public Map<String, Object> getFilters()
获取 `getFilters`。
Returns the filters.
public FilterPolicy getFilterPolicy()
获取过滤策略。
Returns the filter policy.
public Duration getTimeout()
获取超时。
Returns the timeout.
public Integer getMaxRetries()
获取最大重试。
Returns the max retries.
public Map<String, String> getCustomHeaders()
获取自定义请求头。
Returns the custom headers.

字段详情Field Detail

DEFAULT_SUCCESS_CODE

public static final int DEFAULT_SUCCESS_CODE
staticfinal

默认成功 CODE字段。声明为 public static final int DEFAULT_SUCCESS_CODE。

The DEFAULT SUCCESS CODE field.

源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:37

方法详情Method Detail

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:103–105

getBaseUrl

public String getBaseUrl()

获取基类 URL。

Returns the base url.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:107–109

getSuccessCode

public Integer getSuccessCode()

获取 getSuccessCode。

Returns the success code.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:111–113

getTopK

public Integer getTopK()

获取 getTopK。

Returns the top k.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:115–117

getScaleScore

public Boolean getScaleScore()

获取 getScaleScore。

Returns the scale score.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:119–121

getReturnEmbedding

public Boolean getReturnEmbedding()

获取 getReturnEmbedding。

Returns the return embedding.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:123–125

getScoreThreshold

public Double getScoreThreshold()

获取分数阈值。

Returns the score threshold.

返回Returns Double
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:127–129

getGroupBy

public String getGroupBy()

获取组通过。

Returns the group by.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:131–133

getGroupSize

public Integer getGroupSize()

获取组大小。

Returns the group size.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:135–137

getQueryEmbedding

public List<Float> getQueryEmbedding()

获取查询向量化。

Returns the query embedding.

返回Returns List<Float>
返回列出。Returns list.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:139–141

getQuerySparseEmbedding

public SparseEmbedding getQuerySparseEmbedding()

获取 getQuerySparseEmbedding。

Returns the query sparse embedding.

返回Returns SparseEmbedding
返回SparseEmbedding。Returns sparse embedding.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:143–145

getDocuments

public List<HayStackDocument> getDocuments()

获取文档。

Returns the documents.

返回Returns List<HayStackDocument>
返回列出。Returns list.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:147–149

getRetrievedDocuments

public List<HayStackDocument> getRetrievedDocuments()

获取 getRetrievedDocuments。

Returns the retrieved documents.

返回Returns List<HayStackDocument>
返回列出。Returns list.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:151–153

getWindowSize

public Integer getWindowSize()

获取 getWindowSize。

Returns the window size.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:155–157

getFilters

public Map<String, Object> getFilters()

获取 getFilters。

Returns the filters.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:159–161

getFilterPolicy

public FilterPolicy getFilterPolicy()

获取过滤策略。

Returns the filter policy.

返回Returns FilterPolicy
返回FilterPolicy。Returns filter policy.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:163–165

getTimeout

public Duration getTimeout()

获取超时。

Returns the timeout.

返回Returns Duration
返回时长。Returns duration.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:167–169

getMaxRetries

public Integer getMaxRetries()

获取最大重试。

Returns the max retries.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/rag/integration/haystack/HayStackConfig.java:171–173

getCustomHeaders

public Map<String, String> getCustomHeaders()

获取自定义请求头。

Returns the custom headers.

返回Returns Map<String, String>
返回映射。Returns map.
源码Source 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.

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