class

Autobot::Providers::Provider

Inherits Reference < Object

Abstract base for LLM providers.

Implementations handle the specifics of each provider's API while maintaining a consistent interface for the agent loop.

Constructors

new(api_key : String, api_base : Nil | String = nil)
Source

Instance methods

api_base
Source
api_key
Source
chat(messages : Array(Hash(String, JSON::Any)), tools : Array(Hash(String, JSON::Any)) | Nil = nil, model : String | Nil = nil, max_tokens : Int32 = DEFAULT_MAX_TOKENS, temperature : Float64 = DEFAULT_TEMPERATURE) : Response

Send a chat completion request.

Source
default_model

The default model identifier for this provider.

Source
supports_progressive_disclosure?

Whether this provider benefits from progressive tool disclosure. Providers with caching (like Gemini) should disable this so the tool schemas remain stable and don't bust the cache.

Source