AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:199–240

构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 enableSource、enableCitation、citationFormat、forcedSearch、searchStrategy、enableSearchExtension。

A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.dashscope.dto.

方法摘要Method Summary

方法Method说明Description
public Builder enableSource(Boolean enableSource)
启用来源。
Enables the source.
public Builder enableCitation(Boolean enableCitation)
启用该配置。
Enables the citation.
public Builder citationFormat(String citationFormat)
设置该配置项。
Performs the citation format operation.
public Builder forcedSearch(Boolean forcedSearch)
设置该配置项。
Performs the forced search operation.
public Builder searchStrategy(SearchStrategy searchStrategy)
设置该配置项。
Searches the strategy.
public Builder enableSearchExtension(Boolean enableSearchExtension)
启用搜索扩展。
Enables the search extension.
public Builder prependSearchResult(Boolean prependSearchResult)
设置该配置项。
Performs the prepend search result operation.
public DashScopeSearchOptions build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

enableSource

public Builder enableSource(Boolean enableSource)

启用来源。

Enables the source.

参数Parameters
名称Name类型Type说明Description
enableSourceBoolean启用来源(类型 `Boolean`)。The enable source.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:202–205

enableCitation

public Builder enableCitation(Boolean enableCitation)

启用该配置。

Enables the citation.

参数Parameters
名称Name类型Type说明Description
enableCitationBoolean启用 Citation(类型 `Boolean`)。The enable citation.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:207–210

citationFormat

public Builder citationFormat(String citationFormat)

设置该配置项。

Performs the citation format operation.

参数Parameters
名称Name类型Type说明Description
citationFormatStringcitation 格式(类型 `String`)。The citation format.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:212–215

forcedSearch

public Builder forcedSearch(Boolean forcedSearch)

设置该配置项。

Performs the forced search operation.

参数Parameters
名称Name类型Type说明Description
forcedSearchBooleanforced 搜索(类型 `Boolean`)。The forced search.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:217–220

searchStrategy

public Builder searchStrategy(SearchStrategy searchStrategy)

设置该配置项。

Searches the strategy.

参数Parameters
名称Name类型Type说明Description
searchStrategySearchStrategy搜索 Strategy(类型 `SearchStrategy`)。The search strategy.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:222–225

enableSearchExtension

public Builder enableSearchExtension(Boolean enableSearchExtension)

启用搜索扩展。

Enables the search extension.

参数Parameters
名称Name类型Type说明Description
enableSearchExtensionBoolean启用搜索扩展(类型 `Boolean`)。The enable search extension.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:227–230

prependSearchResult

public Builder prependSearchResult(Boolean prependSearchResult)

设置该配置项。

Performs the prepend search result operation.

参数Parameters
名称Name类型Type说明Description
prependSearchResultBooleanprepend 搜索结果(类型 `Boolean`)。The prepend search result.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:232–235

build

public DashScopeSearchOptions build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns DashScopeSearchOptions
返回DashScopeSearchOptions。Returns DashScope search options.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:237–239
基于官方固定版本源码静态生成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.