Class: Legion::Extensions::Llm::Inventory::ReadinessResult

Inherits:
Data
  • Object
show all
Defined in:
lib/legion/extensions/llm/inventory/records.rb

Overview

The result of a provider-specific safe readiness operation. Contains no model output, prompt, tokens, callable, exception, or transition instruction. See section 10.5.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ready:, reason:, metadata: {}) ⇒ ReadinessResult

Returns a new instance of ReadinessResult.



443
444
445
446
447
448
449
# File 'lib/legion/extensions/llm/inventory/records.rb', line 443

def initialize(ready:, reason:, metadata: {})
  super(
    ready: RecordSupport.boolean!(value: ready, field: :ready),
    reason: RecordSupport.sanitized_reason(value: reason, field: :reason),
    metadata: RecordSupport.(value: )
  )
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



442
443
444
# File 'lib/legion/extensions/llm/inventory/records.rb', line 442

def 
  @metadata
end

#readyObject (readonly)

Returns the value of attribute ready

Returns:

  • (Object)

    the current value of ready



442
443
444
# File 'lib/legion/extensions/llm/inventory/records.rb', line 442

def ready
  @ready
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



442
443
444
# File 'lib/legion/extensions/llm/inventory/records.rb', line 442

def reason
  @reason
end

Instance Method Details

#ready?Boolean

Returns:

  • (Boolean)


451
452
453
# File 'lib/legion/extensions/llm/inventory/records.rb', line 451

def ready?
  ready
end