Class: Legion::Extensions::Llm::Anthropic::Actor::FleetWorker

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

Overview

Subscription actor for Anthropic fleet request consumption.

The Subscription dispatch path (use_runner? = false) sends the decoded message as kwargs directly to runner_class, so the runner must be a resolvable module constant and its entry point must accept the message as keyword arguments.

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/legion/extensions/llm/anthropic/actors/fleet_worker.rb', line 50

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

#runner_classObject



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

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

#runner_functionObject



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

def runner_function
  'handle_fleet_request'
end

#use_runner?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/legion/extensions/llm/anthropic/actors/fleet_worker.rb', line 46

def use_runner?
  false
end