Package-level declarations

Types

Link copied to clipboard
class AuthenticationException(val statusCode: Int, val error: OpenAIError, throwable: Throwable? = null) : OpenAIAPIException

Represents an exception thrown when an authentication error occurs while interacting with the OpenAI API.

Link copied to clipboard
class GenericIOException(throwable: Throwable? = null) : OpenAIIOException

An exception thrown in case of an I/O error

Link copied to clipboard
class InvalidRequestException(val statusCode: Int, val error: OpenAIError, throwable: Throwable? = null) : OpenAIAPIException

Represents an exception thrown when an invalid request is made to the OpenAI API.

Link copied to clipboard

Represents an exception thrown when an error occurs while interacting with the OpenAI API.

Link copied to clipboard
@Serializable
data class OpenAIError(val detail: OpenAIErrorDetails? = null)

Represents an error response from the OpenAI API.

Link copied to clipboard
@Serializable
data class OpenAIErrorDetails(val code: String? = null, val message: String? = null, val param: String? = null, val type: String? = null, val line: Int? = null)

Represents an error object returned by the OpenAI API.

Link copied to clipboard

OpenAI client exception

Link copied to clipboard
class OpenAIHttpException(throwable: Throwable? = null) : OpenAIException

Runtime Http Client exception

Link copied to clipboard

An exception thrown in case of an I/O error

Link copied to clipboard
class OpenAIServerException(throwable: Throwable? = null) : OpenAIException

An exception thrown in case of a server error

Link copied to clipboard

An exception thrown in case a request times out.

Link copied to clipboard
class PermissionException(val statusCode: Int, val error: OpenAIError, throwable: Throwable? = null) : OpenAIAPIException

Represents an exception thrown when a permission error occurs while interacting with the OpenAI API.

Link copied to clipboard
class RateLimitException(val statusCode: Int, val error: OpenAIError, throwable: Throwable? = null) : OpenAIAPIException

Represents an exception thrown when the OpenAI API rate limit is exceeded.

Link copied to clipboard
class UnknownAPIException(val statusCode: Int, val error: OpenAIError, throwable: Throwable? = null) : OpenAIAPIException

Represents an exception thrown when an unknown error occurs while interacting with the OpenAI API. This exception is used when the specific type of error is not covered by the existing subclasses.