Class: Legion::Extensions::Llm::Vertex::RegistryEventBuilder

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#offering_available(offering, readiness:) ⇒ Object



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

def offering_available(offering, readiness:)
  registry_event_class.available(
    offering,
    runtime: ,
    health: offering_health(readiness),
    metadata: 
  )
end

#readiness(readiness) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/legion/extensions/llm/vertex/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