Class: Legion::Extensions::Llm::Mlx::RegistryEventBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/extensions/llm/mlx/registry_event_builder.rb

Overview

Builds sanitized lex-llm registry envelopes for MLX provider state.

Instance Method Summary collapse

Instance Method Details

#model_available(model, readiness:) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/legion/extensions/llm/mlx/registry_event_builder.rb', line 19

def model_available(model, readiness:)
  registry_event_class.available(
    model_offering(model),
    runtime: ,
    health: model_health(readiness),
    metadata: (model)
  )
end

#readiness(readiness) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/legion/extensions/llm/mlx/registry_event_builder.rb', line 9

def readiness(readiness)
  registry_event_class.public_send(
    readiness[:ready] ? :available : :unavailable,
    provider_offering(readiness),
    runtime: ,
    health: readiness_health(readiness),
    metadata: (readiness)
  )
end