Class: Legion::Extensions::Llm::Vertex::Actor::FleetWorker

Inherits:
Actors::Subscription
  • Object
show all
Defined in:
lib/legion/extensions/llm/vertex/actors/fleet_worker.rb

Overview

Subscription actor for Vertex fleet request consumption.

runner_class MUST be the constant (not a String): the Subscription dispatch path calls runner_class.send(runner_function, **message) directly when use_runner? is false, and a String cannot be send-ed. The runner entrypoint is kwargs-only to match that call.

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/legion/extensions/llm/vertex/actors/fleet_worker.rb', line 41

def enabled?
  Legion::Extensions::Llm::Fleet::ProviderResponder.enabled_for?(Vertex.discover_instances)
end

#runner_classObject



29
30
31
# File 'lib/legion/extensions/llm/vertex/actors/fleet_worker.rb', line 29

def runner_class
  Legion::Extensions::Llm::Vertex::Runners::FleetWorker
end

#runner_functionObject



33
34
35
# File 'lib/legion/extensions/llm/vertex/actors/fleet_worker.rb', line 33

def runner_function
  'handle_fleet_request'
end

#use_runner?Boolean

Returns:

  • (Boolean)


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

def use_runner?
  false
end