com.launchableinc.openai.OpenAiError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Basic java objects for the OpenAI GPT APIs
package com.launchableinc.openai;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Represents the error body when an OpenAI request fails
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OpenAiError {
public OpenAiErrorDetails error;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class OpenAiErrorDetails {
/**
* Human-readable error message
*/
String message;
/**
* OpenAI error type, for example "invalid_request_error"
* https://platform.openai.com/docs/guides/error-codes/python-library-error-types
*/
String type;
String param;
/**
* OpenAI error code, for example "invalid_api_key"
*/
String code;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy