Builder
public static class Builder
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:123–160构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 model、input、parameters、endpointType、build。
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 model(String model) | 设置模型。 Performs the model operation. |
public Builder input(DashScopeInput input) | 设置输入。 Performs the input operation. |
public Builder parameters(DashScopeParameters parameters) | 设置参数。 Performs the parameters operation. |
public Builder endpointType(EndpointType endpointType) | 设置端点类型。 Sets the endpoint type for endpoint selection. |
public DashScopeRequest build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
model
public Builder model(String model)
设置模型。
Performs the model operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:129–132input
public Builder input(DashScopeInput input)
设置输入。
Performs the input operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | DashScopeInput | 输入消息(类型 `DashScopeInput`)。The input. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:134–137parameters
public Builder parameters(DashScopeParameters parameters)
设置参数。
Performs the parameters operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parameters | DashScopeParameters | 参数(类型 `DashScopeParameters`)。The parameters. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:139–142endpointType
public Builder endpointType(EndpointType endpointType)
设置端点类型。
Sets the endpoint type for endpoint selection.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
endpointType | EndpointType | 端点类型。the endpoint type |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:150–153build
public DashScopeRequest build()
构建并返回最终实例。
Creates and returns an instance.
DashScopeRequest返回DashScopeRequest。Returns DashScope request.
源码Source
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:155–159