OpenAIError
@JsonIgnoreProperties(ignoreUnknown = true) public class OpenAIError
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:36–106OpenAI 错误,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.openai.dto 包。核心成员包括 getMessage、setMessage、getType、setType、getParam、setParam。
OpenAI error DTO.
This class represents error information in an OpenAI API response.
Example JSON:
`{
"message": "Invalid API key",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
`
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OpenAIError() | 初始化 `OpenAIError` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getMessage() | 获取消息。 Returns the message. |
public void setMessage(String message) | 设置消息。 Sets the message. |
public String getType() | 获取类型。 Returns the type. |
public void setType(String type) | 设置类型。 Sets the type. |
public String getParam() | 获取参数。 Returns the param. |
public void setParam(String param) | 设置参数。 Sets the param. |
public String getCode() | 获取 `getCode`。 Returns the code. |
public void setCode(String code) | 设置 `setCode`。 Sets the code. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
构造器详情Constructor Detail
OpenAIError
public OpenAIError()
初始化 OpenAIError 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:55方法详情Method Detail
getMessage
public String getMessage()
获取消息。
Returns the message.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:57–59setMessage
public void setMessage(String message)
设置消息。
Sets the message.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:61–63getType
public String getType()
获取类型。
Returns the type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:65–67setType
public void setType(String type)
设置类型。
Sets the type.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:69–71getParam
public String getParam()
获取参数。
Returns the param.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:73–75setParam
public void setParam(String param)
设置参数。
Sets the param.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
param | String | 参数(类型 `String`)。The param. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:77–79getCode
public String getCode()
获取 getCode。
Returns the code.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:81–83setCode
public void setCode(String code)
设置 setCode。
Sets the code.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
code | String | code(类型 `String`)。The code. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:85–87toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIError.java:89–105