AS AgentScopeAPI 手册 / API Reference

DashScopeRequest

@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeRequest
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:43–161

DashScope 请求,与模型服务通信并返回生成或向量化结果。位于 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.

源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:66–68

DashScopeRequest

public DashScopeRequest(String model, DashScopeInput input, DashScopeParameters parameters)

初始化 DashScopeRequest 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
modelString模型实例(类型 `String`)。The model.
inputDashScopeInput输入消息(类型 `DashScopeInput`)。The input.
parametersDashScopeParameters参数(类型 `DashScopeParameters`)。The parameters.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:70–75

方法详情Method Detail

getModel

public String getModel()

获取模型。

Returns the model.

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

setModel

public void setModel(String model)

设置模型。

Sets the model.

参数Parameters
名称Name类型Type说明Description
modelString模型实例(类型 `String`)。The model.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:81–83

getInput

public DashScopeInput getInput()

获取输入。

Returns the input.

返回Returns DashScopeInput
返回DashScopeInput。Returns DashScope input.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:85–87

setInput

public void setInput(DashScopeInput input)

设置输入。

Sets the input.

参数Parameters
名称Name类型Type说明Description
inputDashScopeInput输入消息(类型 `DashScopeInput`)。The input.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:89–91

getParameters

public DashScopeParameters getParameters()

获取参数。

Returns the parameters.

返回Returns DashScopeParameters
返回DashScopeParameters。Returns DashScope parameters.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:93–95

setParameters

public void setParameters(DashScopeParameters parameters)

设置参数。

Sets the parameters.

参数Parameters
名称Name类型Type说明Description
parametersDashScopeParameters参数(类型 `DashScopeParameters`)。The parameters.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:97–99

getEndpointType

public EndpointType getEndpointType()

获取端点类型。

Gets the endpoint type for endpoint selection.

返回Returns EndpointType
返回EndpointType。the endpoint type (defaults to AUTO)
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:106–108

setEndpointType

public void setEndpointType(EndpointType endpointType)

设置端点类型。

Sets the endpoint type for endpoint selection.

参数Parameters
名称Name类型Type说明Description
endpointTypeEndpointType端点类型。the endpoint type
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeRequest.java:115–117

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/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.

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