AS AgentScopeAPI 手册 / API Reference

BailianConfig

public class BailianConfig
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:50–447

Bailian 配置,保存相关配置项。位于 io.agentscope.core.rag.integration.bailian 包。核心成员包括 getAccessKeyId、getAccessKeySecret、getWorkspaceId、getIndexId、getEndpoint、getDenseSimilarityTopK。

Configuration for Alibaba Cloud Bailian Knowledge Base.

This class contains all the necessary configuration parameters to connect to and interact with Alibaba Cloud Bailian Knowledge Base service, including connection settings and retrieval parameters.

Example usage:

`BailianConfig config = BailianConfig.builder()
.accessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
.accessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
.workspaceId("llm-xxx")
.indexId("mymxbdxxxx")
// Optional: configure retrieval parameters
.denseSimilarityTopK(50)
.sparseSimilarityTopK(50)
.enableReranking(true)
.rerankConfig(RerankConfig.builder()
.modelName("gte-rerank-hybrid")
.build())
.enableRewrite(true)
.rewriteConfig(RewriteConfig.builder()
.modelName("conv-rewrite-qwen-1.8b")
.build())
.build();
`

嵌套类摘要Nested Class Summary

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

方法摘要Method Summary

方法Method说明Description
public String getAccessKeyId()
获取访问键标识。
Gets the Alibaba Cloud Access Key ID.
public String getAccessKeySecret()
获取访问键密钥。
Gets the Alibaba Cloud Access Key Secret.
public String getWorkspaceId()
获取工作区标识。
Gets the Bailian workspace ID.
public String getIndexId()
获取知识库基类索引标识。
Gets the knowledge base index ID.
public String getEndpoint()
获取端点。
Gets the Bailian API endpoint.
public Integer getDenseSimilarityTopK()
获取 `getDenseSimilarityTopK`。
Gets the dense similarity top K value.
public Integer getSparseSimilarityTopK()
获取 `getSparseSimilarityTopK`。
Gets the sparse similarity top K value.
public Boolean getEnableReranking()
获取 `getEnableReranking`。
Checks if reranking is enabled.
public RerankConfig getRerankConfig()
获取重排配置。
Gets the rerank configuration.
public Boolean getEnableRewrite()
获取 `getEnableRewrite`。
Checks if query rewrite is enabled.
public RewriteConfig getRewriteConfig()
获取 `getRewriteConfig`。
Gets the rewrite configuration.
public List<Map<String, String>> getSearchFilters()
获取 `getSearchFilters`。
Gets the search filters.
public Boolean getSaveRetrieverHistory()
获取保存检索器历史。
Checks if retriever history should be saved.
public static Builder builder()
static
创建新的构建器用于 BailianConfig。
Creates a new builder for BailianConfig.

方法详情Method Detail

getAccessKeyId

public String getAccessKeyId()

获取访问键标识。

Gets the Alibaba Cloud Access Key ID.

返回Returns String
访问密钥标识。the access key ID
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:114–116

getAccessKeySecret

public String getAccessKeySecret()

获取访问键密钥。

Gets the Alibaba Cloud Access Key Secret.

返回Returns String
访问密钥密钥。the access key secret
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:123–125

getWorkspaceId

public String getWorkspaceId()

获取工作区标识。

Gets the Bailian workspace ID.

返回Returns String
工作区标识。the workspace ID
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:132–134

getIndexId

public String getIndexId()

获取知识库基类索引标识。

Gets the knowledge base index ID.

返回Returns String
返回字符串结果。the index ID, or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:141–143

getEndpoint

public String getEndpoint()

获取端点。

Gets the Bailian API endpoint.

返回Returns String
API 端点。the API endpoint
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:150–152

getDenseSimilarityTopK

public Integer getDenseSimilarityTopK()

获取 getDenseSimilarityTopK。

Gets the dense similarity top K value.

返回Returns Integer
返回数值结果。the dense similarity top K (0-100), or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:159–161

getSparseSimilarityTopK

public Integer getSparseSimilarityTopK()

获取 getSparseSimilarityTopK。

Gets the sparse similarity top K value.

返回Returns Integer
返回数值结果。the sparse similarity top K (0-100), or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:168–170

getEnableReranking

public Boolean getEnableReranking()

获取 getEnableReranking。

Checks if reranking is enabled.

返回Returns Boolean
返回布尔值,表示判断结果。true if reranking is enabled, null if not configured
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:177–179

getRerankConfig

public RerankConfig getRerankConfig()

获取重排配置。

Gets the rerank configuration.

返回Returns RerankConfig
返回RerankConfig。the rerank config, or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:186–188

getEnableRewrite

public Boolean getEnableRewrite()

获取 getEnableRewrite。

Checks if query rewrite is enabled.

返回Returns Boolean
返回布尔值,表示判断结果。true if rewrite is enabled, null if not configured
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:195–197

getRewriteConfig

public RewriteConfig getRewriteConfig()

获取 getRewriteConfig。

Gets the rewrite configuration.

返回Returns RewriteConfig
返回RewriteConfig。the rewrite config, or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:204–206

getSearchFilters

public List<Map<String, String>> getSearchFilters()

获取 getSearchFilters。

Gets the search filters.

返回Returns List<Map<String, String>>
返回列出>。the search filters list, or null if not set
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:213–215

getSaveRetrieverHistory

public Boolean getSaveRetrieverHistory()

获取保存检索器历史。

Checks if retriever history should be saved.

返回Returns Boolean
返回布尔值,表示判断结果。true if history should be saved, null if not configured
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:222–224

builder

public static Builder builder()
static

创建新的构建器用于 BailianConfig。

Creates a new builder for BailianConfig.

返回Returns Builder
一种新的构建器实例。a new Builder instance
源码Source io/agentscope/core/rag/integration/bailian/BailianConfig.java:231–233

嵌套类详情Nested Class Detail

Builder

public static class Builder

BailianConfig的构建器。位于 io.agentscope.core.rag.integration.bailian 包。核心成员包括 accessKeyId、accessKeySecret、workspaceId、indexId、endpoint、denseSimilarityTopK。

Builder for BailianConfig.

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