AS AgentScopeAPI 手册 / API Reference

DashScopeSearchOptions

@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeSearchOptions
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:40–241

DashScope 搜索选项,保存相关配置项。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getEnableSource、setEnableSource、getEnableCitation、setEnableCitation、getCitationFormat、setCitationFormat。

DashScope search options DTO.

This class represents the search strategy configuration in a DashScope API request. It is used to control internet search behavior when enable_search is true.

Example JSON:

`{
"enable_source": true,
"enable_citation": true,
"citation_format": "[<number>]",
"forced_search": false,
"search_strategy": "turbo",
"enable_search_extension": false,
"prepend_search_result": false
}
`

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
SearchStrategy枚举enum
定义搜索 Strategy相关取值的枚举。
A enum in io.agentscope.extensions.model.dashscope.dto that defines enum values used when components talks to model services and returns generated or embedded output.
Builder类class
构建器,用于构建并配置目标实例。
A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output.

构造器摘要Constructor Summary

构造器Constructor说明Description
public DashScopeSearchOptions()
初始化 `DashScopeSearchOptions` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Boolean getEnableSource()
获取启用来源。
Returns the enable source.
public void setEnableSource(Boolean enableSource)
设置启用来源。
Sets the enable source.
public Boolean getEnableCitation()
获取 `getEnableCitation`。
Returns the enable citation.
public void setEnableCitation(Boolean enableCitation)
设置 `setEnableCitation`。
Sets the enable citation.
public String getCitationFormat()
获取 `getCitationFormat`。
Returns the citation format.
public void setCitationFormat(String citationFormat)
设置 `setCitationFormat`。
Sets the citation format.
public Boolean getForcedSearch()
获取 `getForcedSearch`。
Returns the forced search.
public void setForcedSearch(Boolean forcedSearch)
设置 `setForcedSearch`。
Sets the forced search.
public SearchStrategy getSearchStrategy()
获取 `getSearchStrategy`。
Returns the search strategy.
public void setSearchStrategy(SearchStrategy searchStrategy)
设置 `setSearchStrategy`。
Sets the search strategy.
public Boolean getEnableSearchExtension()
获取启用搜索扩展。
Returns the enable search extension.
public void setEnableSearchExtension(Boolean enableSearchExtension)
设置启用搜索扩展。
Sets the enable search extension.
public Boolean getPrependSearchResult()
获取 `getPrependSearchResult`。
Returns the prepend search result.
public void setPrependSearchResult(Boolean prependSearchResult)
设置 `setPrependSearchResult`。
Sets the prepend search result.
public static Builder builder()
static
返回构建器实例。
Returns the builder.

构造器详情Constructor Detail

DashScopeSearchOptions

public DashScopeSearchOptions()

初始化 DashScopeSearchOptions 实例。

Creates a new instance.

源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:99

方法详情Method Detail

getEnableSource

public Boolean getEnableSource()

获取启用来源。

Returns the enable source.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:101–103

setEnableSource

public void setEnableSource(Boolean enableSource)

设置启用来源。

Sets the enable source.

参数Parameters
名称Name类型Type说明Description
enableSourceBoolean启用来源(类型 `Boolean`)。The enable source.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:105–107

getEnableCitation

public Boolean getEnableCitation()

获取 getEnableCitation。

Returns the enable citation.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:109–111

setEnableCitation

public void setEnableCitation(Boolean enableCitation)

设置 setEnableCitation。

Sets the enable citation.

参数Parameters
名称Name类型Type说明Description
enableCitationBoolean启用 Citation(类型 `Boolean`)。The enable citation.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:113–115

getCitationFormat

public String getCitationFormat()

获取 getCitationFormat。

Returns the citation format.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:117–119

setCitationFormat

public void setCitationFormat(String citationFormat)

设置 setCitationFormat。

Sets the citation format.

参数Parameters
名称Name类型Type说明Description
citationFormatStringcitation 格式(类型 `String`)。The citation format.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:121–123

getForcedSearch

public Boolean getForcedSearch()

获取 getForcedSearch。

Returns the forced search.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:125–127

setForcedSearch

public void setForcedSearch(Boolean forcedSearch)

设置 setForcedSearch。

Sets the forced search.

参数Parameters
名称Name类型Type说明Description
forcedSearchBooleanforced 搜索(类型 `Boolean`)。The forced search.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:129–131

getSearchStrategy

public SearchStrategy getSearchStrategy()

获取 getSearchStrategy。

Returns the search strategy.

返回Returns SearchStrategy
返回SearchStrategy。Returns search strategy.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:133–135

setSearchStrategy

public void setSearchStrategy(SearchStrategy searchStrategy)

设置 setSearchStrategy。

Sets the search strategy.

参数Parameters
名称Name类型Type说明Description
searchStrategySearchStrategy搜索 Strategy(类型 `SearchStrategy`)。The search strategy.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:137–139

getEnableSearchExtension

public Boolean getEnableSearchExtension()

获取启用搜索扩展。

Returns the enable search extension.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:141–143

setEnableSearchExtension

public void setEnableSearchExtension(Boolean enableSearchExtension)

设置启用搜索扩展。

Sets the enable search extension.

参数Parameters
名称Name类型Type说明Description
enableSearchExtensionBoolean启用搜索扩展(类型 `Boolean`)。The enable search extension.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:145–147

getPrependSearchResult

public Boolean getPrependSearchResult()

获取 getPrependSearchResult。

Returns the prepend search result.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:149–151

setPrependSearchResult

public void setPrependSearchResult(Boolean prependSearchResult)

设置 setPrependSearchResult。

Sets the prepend search result.

参数Parameters
名称Name类型Type说明Description
prependSearchResultBooleanprepend 搜索结果(类型 `Boolean`)。The prepend search result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:153–155

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:195–197

嵌套类详情Nested Class Detail

SearchStrategy

public enum SearchStrategy

定义搜索 Strategy相关取值的枚举。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 TURBO、MAX、AGENT、AGENT_MAX。

A enum in io.agentscope.extensions.model.dashscope.dto that defines enum values used when components talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.dashscope.dto.

Builder

public static class Builder

构建器,用于构建并配置目标实例。位于 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.

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