Module: Legion::Extensions::Llm::Vertex

Extended by:
Core
Defined in:
lib/legion/extensions/llm/vertex.rb,
lib/legion/extensions/llm/vertex/version.rb,
lib/legion/extensions/llm/vertex/provider.rb

Overview

Google Cloud Vertex AI provider extension namespace.

Defined Under Namespace

Classes: Provider

Constant Summary collapse

PROVIDER_FAMILY =
:vertex
VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.default_settingsObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/legion/extensions/llm/vertex.rb', line 16

def self.default_settings
  ::Legion::Extensions::Llm.provider_settings(
    family: PROVIDER_FAMILY,
    discovery: { enabled: true, live: false, locations: %w[us-central1 us-east5 europe-west4] },
    instance: {
      endpoint: 'https://us-central1-aiplatform.googleapis.com/v1',
      project: 'env://GOOGLE_CLOUD_PROJECT',
      location: 'us-central1',
      tier: :frontier,
      transport: :http,
      credentials: {
        provider: 'google-application-default-credentials',
        access_token: 'env://VERTEX_ACCESS_TOKEN',
        credentials_file: 'env://GOOGLE_APPLICATION_CREDENTIALS'
      },
      usage: { inference: true, embedding: true, token_counting: true },
      limits: { concurrency: 4 }
    }
  )
end

.provider_classObject



37
38
39
# File 'lib/legion/extensions/llm/vertex.rb', line 37

def self.provider_class
  Provider
end