类 DashScopeResponse
java.lang.Object
io.agentscope.core.formatter.dashscope.dto.DashScopeResponse
DashScope API response DTO.
This class represents the top-level response structure from DashScope's text-generation and multimodal-generation APIs.
Example JSON:
{
"request_id": "xxx-xxx-xxx",
"output": {
"choices": [...]
},
"usage": {
"input_tokens": 10,
"output_tokens": 20
}
}
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getCode()getUsage()booleanisError()Check if this response represents an error.voidvoidsetMessage(String message) voidsetOutput(DashScopeOutput output) voidsetRequestId(String requestId) voidsetUsage(DashScopeUsage usage)
-
构造器详细资料
-
DashScopeResponse
public DashScopeResponse()
-
-
方法详细资料
-
getRequestId
-
setRequestId
-
getOutput
-
setOutput
-
getUsage
-
setUsage
-
getCode
-
setCode
-
getMessage
-
setMessage
-
isError
public boolean isError()Check if this response represents an error.- 返回:
- true if the response contains an error code
-