Class OpenAIError

Hierarchy

  • Error
    • OpenAIError

Constructors

  • Parameters

    • type: "NO_API_KEY" | "MAX_TOKENS" | "UNKNOWN" | "INVALID_API_KEY" | "INVALID_MODEL" | "RATE_LIMIT_REACHED" | "EXCEEDED_QUOTA" | "ENGINE_OVERLOAD" | "SERVER_ERROR"

    Returns OpenAIError

Properties

cause?: unknown
name: string
stack?: string
type: "NO_API_KEY" | "MAX_TOKENS" | "UNKNOWN" | "INVALID_API_KEY" | "INVALID_MODEL" | "RATE_LIMIT_REACHED" | "EXCEEDED_QUOTA" | "ENGINE_OVERLOAD" | "SERVER_ERROR"
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Returns {
        message: OpenAIErrorMessage;
        type: "NO_API_KEY" | "MAX_TOKENS" | "UNKNOWN" | "INVALID_API_KEY" | "INVALID_MODEL" | "RATE_LIMIT_REACHED" | "EXCEEDED_QUOTA" | "ENGINE_OVERLOAD" | "SERVER_ERROR";
    }

    • message: OpenAIErrorMessage
    • type: "NO_API_KEY" | "MAX_TOKENS" | "UNKNOWN" | "INVALID_API_KEY" | "INVALID_MODEL" | "RATE_LIMIT_REACHED" | "EXCEEDED_QUOTA" | "ENGINE_OVERLOAD" | "SERVER_ERROR"
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc