class

Arcana::AI::Registry

Inherits Reference < Object

Unified provider registry across all domains (chat, image, tts, embed).

Providers self-register with a name and factory block. Consumers create providers by name + config without knowing the concrete class.

Arcana::AI::Registry.create_chat("openai", {"api_key" => "sk-..."})

Class methods

bool(config : Config, key : String, default : Bool = false) : Bool

Pull a bool from config, with optional default.

Source
chat_providers
Source
create_chat(name : String, config : Config = Config.new) : Chat::Provider
Source
create_embed(name : String, config : Config = Config.new) : Embed::Provider
Source
create_image(name : String, config : Config = Config.new) : Image::Provider
Source
create_sfx(name : String, config : Config = Config.new) : SFX::Provider
Source
create_tts(name : String, config : Config = Config.new) : TTS::Provider
Source
embed_providers
Source
float(config : Config, key : String, default : Float64 = 0.0) : Float64

Pull a float from config, with optional default.

Source
image_providers
Source
int(config : Config, key : String, default : Int32 = 0) : Int32

Pull an int from config, with optional default.

Source
register_chat(name : String, &block : Config -> Chat::Provider)
Source
register_embed(name : String, &block : Config -> Embed::Provider)
Source
register_image(name : String, &block : Config -> Image::Provider)
Source
register_sfx(name : String, &block : Config -> SFX::Provider)
Source
register_tts(name : String, &block : Config -> TTS::Provider)
Source
sfx_providers
Source
str(config : Config, key : String, default : String = "") : String

Pull a string from config, with optional default.

Source
tts_providers
Source

Nested types