class LittleGhost::Providers::VertexAI
Connects a Model to Gemini models hosted by Google Vertex AI.
It sends the same request content as the Gemini adapter to the configured Google Cloud project and location. A trusted credential resolver supplies each access token. Cancellation, deadlines, normalized streaming events, and ProviderError behavior match Providers::Gemini.
Public Class Methods
# File lib/little_ghost/providers/vertex_ai.rb, line 16 def initialize(model:, project:, location: "global", access_token: nil, credential_resolver: nil, base_url: nil, **arguments) @project = project.to_s @location = location.to_s @credential_resolver = credential_resolver || CredentialResolver.new(access_token:) raise ConfigurationError, "Vertex AI project is required" if @project.empty? base_url ||= "https://#{@location}-aiplatform.googleapis.com/v1/" super(api_key: "unused", model:, base_url:, **arguments) end
Creates a Vertex AI client for a Google Cloud project and location.
Calls superclass method
LittleGhost::Providers::Gemini::new