Builder
public static class Builder
io/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:280–386构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 resultFormat、incrementalOutput、temperature、topP、topK、maxTokens。
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 Detail
resultFormat
public Builder resultFormat(String resultFormat)
设置结果格式。
Performs the result format operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
resultFormat | String | 结果格式(类型 `String`)。The result format. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:283–286incrementalOutput
public Builder incrementalOutput(Boolean incrementalOutput)
设置该配置项。
Performs the incremental output operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
incrementalOutput | Boolean | incremental 输出(类型 `Boolean`)。The incremental output. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:288–291temperature
public Builder temperature(Double temperature)
设置该配置项。
Performs the temperature operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
temperature | Double | temperature(类型 `Double`)。The temperature. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:293–296topP
public Builder topP(Double topP)
设置该配置项。
Performs the top p operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
topP | Double | top P(类型 `Double`)。The top p. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:298–301topK
public Builder topK(Integer topK)
设置该配置项。
Performs the top k operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
topK | Integer | top K(类型 `Integer`)。The top k. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:303–306maxTokens
public Builder maxTokens(Integer maxTokens)
设置最大令牌数。
Performs the max tokens operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxTokens | Integer | 最大令牌数(类型 `Integer`)。The max tokens. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:308–311stop
public Builder stop(List<String> stop)
设置停止。
Performs the stop operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stop | List<String> | 停止(类型 `List`)。The stop. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:313–316enableThinking
public Builder enableThinking(Boolean enableThinking)
启用该配置。
Enables the thinking.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableThinking | Boolean | 启用 Thinking(类型 `Boolean`)。The enable thinking. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:318–321thinkingBudget
public Builder thinkingBudget(Integer thinkingBudget)
设置该配置项。
Performs the thinking budget operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
thinkingBudget | Integer | thinking 预算(类型 `Integer`)。The thinking budget. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:323–326enableSearch
public Builder enableSearch(Boolean enableSearch)
启用搜索。
Enables the search.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableSearch | Boolean | 启用搜索(类型 `Boolean`)。The enable search. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:328–331searchOptions
public Builder searchOptions(DashScopeSearchOptions searchOptions)
设置搜索选项。
Searches the options.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
searchOptions | DashScopeSearchOptions | 搜索选项(类型 `DashScopeSearchOptions`)。The search options. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:333–336enableCodeInterpreter
public Builder enableCodeInterpreter(Boolean enableCodeInterpreter)
启用该配置。
Enables the code interpreter.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableCodeInterpreter | Boolean | 启用 Code Interpreter(类型 `Boolean`)。The enable code interpreter. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:338–341tools
public Builder tools(List<DashScopeTool> tools)
设置工具。
Performs the tools operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tools | List<DashScopeTool> | 工具列表(类型 `List`)。The tools. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:343–346toolChoice
public Builder toolChoice(Object toolChoice)
设置工具选项。
Performs the tool choice operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolChoice | Object | 工具选项(类型 `Object`)。The tool choice. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:348–351parallelToolCalls
public Builder parallelToolCalls(Boolean parallelToolCalls)
设置该配置项。
Performs the parallel tool calls operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parallelToolCalls | Boolean | parallel 工具调用(类型 `Boolean`)。The parallel tool calls. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:353–356seed
public Builder seed(Integer seed)
设置预置。
Performs the seed operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
seed | Integer | 预置(类型 `Integer`)。The seed. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:358–361frequencyPenalty
public Builder frequencyPenalty(Double frequencyPenalty)
设置该配置项。
Performs the frequency penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
frequencyPenalty | Double | frequency Penalty(类型 `Double`)。The frequency penalty. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:363–366presencePenalty
public Builder presencePenalty(Double presencePenalty)
设置该配置项。
Performs the presence penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
presencePenalty | Double | 在线状态 Penalty(类型 `Double`)。The presence penalty. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:368–371repetitionPenalty
public Builder repetitionPenalty(Double repetitionPenalty)
设置该配置项。
Performs the repetition penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
repetitionPenalty | Double | repetition Penalty(类型 `Double`)。The repetition penalty. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:373–376responseFormat
public Builder responseFormat(ResponseFormat responseFormat)
设置响应格式。
Performs the response format operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
responseFormat | ResponseFormat | 响应格式(类型 `ResponseFormat`)。The response format. |
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:378–381build
public DashScopeParameters build()
构建并返回最终实例。
Creates and returns an instance.
DashScopeParametersio/agentscope/extensions/model/dashscope/dto/DashScopeParameters.java:383–385