Class: Legion::Extensions::Llm::Mlx::Actor::FleetWorker

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

Overview

Subscription actor for MLX fleet request consumption.

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


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

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

#runner_classObject

The runner module as a constant: the Subscription dispatch path calls runner_class.send(runner_function, **message), which a String cannot receive.



26
27
28
# File 'lib/legion/extensions/llm/mlx/actors/fleet_worker.rb', line 26

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

#runner_functionObject



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

def runner_function
  'handle_fleet_request'
end

#use_runner?Boolean

Call the runner module directly — no task record per inference hop.

Returns:

  • (Boolean)


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

def use_runner?
  false
end