Class: Legion::Extensions::Llm::AzureFoundry::Actor::FleetWorker

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

Overview

Subscription actor for Azure Foundry fleet request consumption.

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


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

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

#runner_classObject

The Subscription dispatch path (use_runner? == false) calls runner_class.send(fn, **message) — a String cannot be send-ed, so the runner must be the resolved module constant, and the runner's entry point must accept the decoded message as keyword arguments.



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

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

#runner_functionObject



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

def runner_function
  'handle_fleet_request'
end

#use_runner?Boolean

Returns:

  • (Boolean)


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

def use_runner?
  false
end