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 |
|---|---|---|
enableSource | Boolean | 启用来源(类型 `Boolean`)。The enable source. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:202–205enableCitation
public Builder enableCitation(Boolean enableCitation)
启用该配置。
Enables the citation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableCitation | Boolean | 启用 Citation(类型 `Boolean`)。The enable citation. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:207–210citationFormat
public Builder citationFormat(String citationFormat)
设置该配置项。
Performs the citation format operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
citationFormat | String | citation 格式(类型 `String`)。The citation format. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:212–215forcedSearch
public Builder forcedSearch(Boolean forcedSearch)
设置该配置项。
Performs the forced search operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
forcedSearch | Boolean | forced 搜索(类型 `Boolean`)。The forced search. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:217–220searchStrategy
public Builder searchStrategy(SearchStrategy searchStrategy)
设置该配置项。
Searches the strategy.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
searchStrategy | SearchStrategy | 搜索 Strategy(类型 `SearchStrategy`)。The search strategy. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:222–225enableSearchExtension
public Builder enableSearchExtension(Boolean enableSearchExtension)
启用搜索扩展。
Enables the search extension.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableSearchExtension | Boolean | 启用搜索扩展(类型 `Boolean`)。The enable search extension. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:227–230prependSearchResult
public Builder prependSearchResult(Boolean prependSearchResult)
设置该配置项。
Performs the prepend search result operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
prependSearchResult | Boolean | prepend 搜索结果(类型 `Boolean`)。The prepend search result. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:232–235build
public DashScopeSearchOptions build()
构建并返回最终实例。
Creates and returns an instance.
DashScopeSearchOptions返回DashScopeSearchOptions。Returns DashScope search options.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeSearchOptions.java:237–239