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

Extended by:
Core, AutoRegistration, Logging::Helper
Defined in:
lib/legion/extensions/llm/vertex.rb,
lib/legion/extensions/llm/vertex/version.rb,
lib/legion/extensions/llm/vertex/provider.rb,
lib/legion/extensions/llm/vertex/actors/fleet_worker.rb,
lib/legion/extensions/llm/vertex/runners/fleet_worker.rb,
lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb

Overview

Google Cloud Vertex AI provider extension namespace.

Defined Under Namespace

Modules: Actor, Runners Classes: Provider

Constant Summary collapse

PROVIDER_FAMILY =
:vertex
VERSION =
'0.2.13'

Class Method Summary collapse

Class Method Details

.default_settingsObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/legion/extensions/llm/vertex.rb', line 19

def self.default_settings
  ::Legion::Extensions::Llm.provider_settings(
    family: PROVIDER_FAMILY,
    instance: {
      endpoint: nil,
      project: nil,
      location: 'us-central1',
      publisher: 'google',
      tier: :cloud,
      transport: :http,
      credentials: {
        access_token: nil,
        credentials: nil
      },
      provider: {
        project: nil,
        location: 'us-central1',
        model_aliases: {}
      },
      usage: { inference: true, embedding: true, image: false },
      limits: { concurrency: 4 },
      fleet: {
        enabled: false,
        respond_to_requests: false,
        capabilities: %i[chat stream_chat embed tools]
      }
    }
  )
end

.discover_instancesObject



53
54
55
56
57
58
# File 'lib/legion/extensions/llm/vertex.rb', line 53

def self.discover_instances
  instances = {}
  discover_default_instance(instances)
  discover_named_instances(instances)
  instances
end

.provider_classObject



49
50
51
# File 'lib/legion/extensions/llm/vertex.rb', line 49

def self.provider_class
  Provider
end