class AI::Provider::LoadAPIKeyError

Overview

Error thrown when an API key cannot be loaded.

This error is typically raised when the SDK cannot find or read the API key from environment variables or configuration.

Defined in:

ai/provider/errors/load_api_key_error.cr

Constructors

Class Method Summary

Instance methods inherited from class AI::Provider::AISDKError

name : String name, to_s(io : IO) : Nil to_s

Constructor methods inherited from class AI::Provider::AISDKError

new(*, name : String, message : String, cause : Exception | Nil = nil) new

Class methods inherited from class AI::Provider::AISDKError

instance?(error) : Bool instance?

Constructor Detail

def self.new(*, message : String) #

Creates a new LoadAPIKeyError.

Parameters:

  • message: The error message describing what went wrong

[View source]

Class Method Detail

def self.instance?(error) : Bool #

Checks if the given value is an instance of LoadAPIKeyError.


[View source]