AS AgentScopeAPI 手册 / API Reference

OpenAIError

@JsonIgnoreProperties(ignoreUnknown = true) public class OpenAIError
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:36–106

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

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:57–59

setMessage

public void setMessage(String message)

设置消息。

Sets the message.

参数Parameters
名称Name类型Type说明Description
messageString消息(类型 `String`)。The message.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:61–63

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:65–67

setType

public void setType(String type)

设置类型。

Sets the type.

参数Parameters
名称Name类型Type说明Description
typeString类型(类型 `String`)。The type.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:69–71

getParam

public String getParam()

获取参数。

Returns the param.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:73–75

setParam

public void setParam(String param)

设置参数。

Sets the param.

参数Parameters
名称Name类型Type说明Description
paramString参数(类型 `String`)。The param.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:77–79

getCode

public String getCode()

获取 getCode。

Returns the code.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:81–83

setCode

public void setCode(String code)

设置 setCode。

Sets the code.

参数Parameters
名称Name类型Type说明Description
codeStringcode(类型 `String`)。The code.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:85–87

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openai/dto/OpenAIError.java:89–105
基于官方固定版本源码静态生成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.