Class: ActiveAgent::Providers::GeminiProvider

Inherits:
OpenAI::ChatProvider show all
Defined in:
lib/active_agent/providers/gemini_provider.rb

Overview

Provides access to Google’s Gemini API via OpenAI-compatible endpoint.

Extends OpenAI provider to work with Gemini’s OpenAI-compatible API, enabling access to Gemini models through a familiar interface.

Class Method Summary collapse

Methods included from ToolChoiceClearing

#prepare_prompt_request_tools

Methods inherited from OpenAI::Base

#client

Methods inherited from BaseProvider

#embed, #initialize, namespace, #preview, #prompt, tag_name

Methods included from Previewable

#preview_prompt

Methods included from Instrumentation

#instrumentation_prompt_payload

Methods included from ExceptionHandler

#configure_exception_handler, #rescue_with_handler, #with_exception_handling

Constructor Details

This class inherits a constructor from ActiveAgent::Providers::BaseProvider

Class Method Details

.embed_request_typeActiveModel::Type::Value

Returns:

  • (ActiveModel::Type::Value)


34
35
36
# File 'lib/active_agent/providers/gemini_provider.rb', line 34

def self.embed_request_type
  namespace::Embedding::RequestType.new
end

.options_klassClass

Returns:

  • (Class)


24
25
26
# File 'lib/active_agent/providers/gemini_provider.rb', line 24

def self.options_klass
  namespace::Options
end

.prompt_request_typeActiveModel::Type::Value

Returns:

  • (ActiveModel::Type::Value)


29
30
31
# File 'lib/active_agent/providers/gemini_provider.rb', line 29

def self.prompt_request_type
  namespace::RequestType.new
end

.service_nameString

Returns:

  • (String)


19
20
21
# File 'lib/active_agent/providers/gemini_provider.rb', line 19

def self.service_name
  "Gemini"
end