DashScopeRequest
@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeRequest
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:43–161DashScope 请求,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getModel、setModel、getInput、setInput、getParameters、setParameters。
DashScope API request DTO.
This class represents the top-level request structure for DashScope's text-generation and multimodal-generation APIs.
Example JSON:
`{
"model": "qwen-plus",
"input": {
"messages": [...]
},
"parameters": {
"result_format": "message",
"temperature": 0.7
}
}
`
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
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 DashScopeRequest() | 初始化 `DashScopeRequest` 实例。 Creates a new instance. |
public DashScopeRequest(String model, DashScopeInput input, DashScopeParameters parameters) | 初始化 `DashScopeRequest` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getModel() | 获取模型。 Returns the model. |
public void setModel(String model) | 设置模型。 Sets the model. |
public DashScopeInput getInput() | 获取输入。 Returns the input. |
public void setInput(DashScopeInput input) | 设置输入。 Sets the input. |
public DashScopeParameters getParameters() | 获取参数。 Returns the parameters. |
public void setParameters(DashScopeParameters parameters) | 设置参数。 Sets the parameters. |
public EndpointType getEndpointType() | 获取端点类型。 Gets the endpoint type for endpoint selection. |
public void setEndpointType(EndpointType endpointType) | 设置端点类型。 Sets the endpoint type for endpoint selection. |
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
构造器详情Constructor Detail
DashScopeRequest
public DashScopeRequest()
初始化 DashScopeRequest 实例。
Creates a new instance.
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:66–68DashScopeRequest
public DashScopeRequest(String model, DashScopeInput input, DashScopeParameters parameters)
初始化 DashScopeRequest 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
input | DashScopeInput | 输入消息(类型 `DashScopeInput`)。The input. |
parameters | DashScopeParameters | 参数(类型 `DashScopeParameters`)。The parameters. |
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:70–75方法详情Method Detail
getModel
public String getModel()
获取模型。
Returns the model.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:77–79setModel
public void setModel(String model)
设置模型。
Sets the model.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:81–83getInput
public DashScopeInput getInput()
获取输入。
Returns the input.
DashScopeInputio/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:85–87setInput
public void setInput(DashScopeInput input)
设置输入。
Sets the input.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | DashScopeInput | 输入消息(类型 `DashScopeInput`)。The input. |
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:89–91getParameters
public DashScopeParameters getParameters()
获取参数。
Returns the parameters.
DashScopeParametersio/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:93–95setParameters
public void setParameters(DashScopeParameters parameters)
设置参数。
Sets the parameters.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parameters | DashScopeParameters | 参数(类型 `DashScopeParameters`)。The parameters. |
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:97–99getEndpointType
public EndpointType getEndpointType()
获取端点类型。
Gets the endpoint type for endpoint selection.
EndpointTypeio/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:106–108setEndpointType
public void setEndpointType(EndpointType endpointType)
设置端点类型。
Sets the endpoint type for endpoint selection.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
endpointType | EndpointType | 端点类型。the endpoint type |
io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:115–117builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:119–121嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 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.