class

Arcana::AI::Chat::Gemini

Inherits Arcana::AI::Chat::Provider < Arcana::AI::Traceable < Reference < Object

Constants

DEFAULT_MODEL = "gemini-2.5-flash"
ENDPOINT = "https://generativelanguage.googleapis.com/v1beta"

Constructors

new(api_key : String, model : String = DEFAULT_MODEL, endpoint : String = ENDPOINT, trace : Proc(String, Nil) | Nil = nil, name : String = "gemini")
Source

Instance methods

complete(request : Request, ctx : Context) : Response

Complete with cancellation support. Override for real mid-flight abort.

Source
complete(request : Request) : Response
Source
model
Source
models

List available models. Override in subclasses that support it.

Source
name

The service behind the endpoint, which responses carry as their provider and Pricing looks rates up by.

Source
stream(request : Request, ctx : Context | Nil = nil, &block : StreamEvent -> ) : Response

Stream a chat completion, yielding events as they arrive. Override in subclasses that support streaming.

Source