Class: Legion::Extensions::Llm::Inventory::OfferingDraft
- Inherits:
-
Data
- Object
- Data
- Legion::Extensions::Llm::Inventory::OfferingDraft
- Defined in:
- lib/legion/extensions/llm/inventory/records.rb
Overview
An off-registry provider draft of one offering. Carries the validated write-time weight pair, but no provider family, instance ID, offering ID, lane ID, callable, health, or default model. See section 10.1.
Instance Attribute Summary collapse
-
#base_weight ⇒ Object
readonly
Returns the value of attribute base_weight.
-
#capability_evidence ⇒ Object
readonly
Returns the value of attribute capability_evidence.
-
#context_evidence ⇒ Object
readonly
Returns the value of attribute context_evidence.
-
#embedding_dimensions_evidence ⇒ Object
readonly
Returns the value of attribute embedding_dimensions_evidence.
-
#max_output_evidence ⇒ Object
readonly
Returns the value of attribute max_output_evidence.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#model_revision_evidence ⇒ Object
readonly
Returns the value of attribute model_revision_evidence.
-
#operation_evidence ⇒ Object
readonly
Returns the value of attribute operation_evidence.
-
#provider_native_key ⇒ Object
readonly
Returns the value of attribute provider_native_key.
-
#publication_source ⇒ Object
readonly
Returns the value of attribute publication_source.
-
#quota_domains ⇒ Object
readonly
Returns the value of attribute quota_domains.
-
#tier ⇒ Object
readonly
Returns the value of attribute tier.
-
#tokenizer_evidence ⇒ Object
readonly
Returns the value of attribute tokenizer_evidence.
-
#weight_inputs ⇒ Object
readonly
Returns the value of attribute weight_inputs.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ OfferingDraft
constructor
A new instance of OfferingDraft.
Constructor Details
#initialize(**kwargs) ⇒ OfferingDraft
Returns a new instance of OfferingDraft.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 292 def initialize(**kwargs) kwargs = { capability_evidence: {}, quota_domains: {}, metadata: {} }.merge(kwargs) RecordSupport.check_unknown_kwargs!(kwargs: kwargs, members: self.class.members) weight_inputs, base_weight = RecordSupport.validated_weight_pair( weight_inputs: kwargs[:weight_inputs], base_weight: kwargs[:base_weight] ) super( provider_native_key: Identity.normalize_text(value: kwargs[:provider_native_key], field: :provider_native_key), model: Identity.normalize_text(value: kwargs[:model], field: :model), tier: Identity.normalize_enum(value: kwargs[:tier], field: :tier, allowed: Taxonomies::TIERS), operation_evidence: RecordSupport.validate_operation_evidence!(kwargs[:operation_evidence]), capability_evidence: RecordSupport.validate_capability_evidence!(kwargs[:capability_evidence]), quota_domains: RecordSupport.validate_quota_domains!(kwargs[:quota_domains]), metadata: RecordSupport.(value: kwargs[:metadata]), publication_source: RecordSupport.publication_source!(value: kwargs[:publication_source]), weight_inputs: weight_inputs, base_weight: base_weight, **RecordSupport.scalar_value_evidences(kwargs) ) end |
Instance Attribute Details
#base_weight ⇒ Object (readonly)
Returns the value of attribute base_weight
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def base_weight @base_weight end |
#capability_evidence ⇒ Object (readonly)
Returns the value of attribute capability_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def capability_evidence @capability_evidence end |
#context_evidence ⇒ Object (readonly)
Returns the value of attribute context_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def context_evidence @context_evidence end |
#embedding_dimensions_evidence ⇒ Object (readonly)
Returns the value of attribute embedding_dimensions_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def @embedding_dimensions_evidence end |
#max_output_evidence ⇒ Object (readonly)
Returns the value of attribute max_output_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def max_output_evidence @max_output_evidence end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def @metadata end |
#model ⇒ Object (readonly)
Returns the value of attribute model
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def model @model end |
#model_revision_evidence ⇒ Object (readonly)
Returns the value of attribute model_revision_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def model_revision_evidence @model_revision_evidence end |
#operation_evidence ⇒ Object (readonly)
Returns the value of attribute operation_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def operation_evidence @operation_evidence end |
#provider_native_key ⇒ Object (readonly)
Returns the value of attribute provider_native_key
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def provider_native_key @provider_native_key end |
#publication_source ⇒ Object (readonly)
Returns the value of attribute publication_source
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def publication_source @publication_source end |
#quota_domains ⇒ Object (readonly)
Returns the value of attribute quota_domains
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def quota_domains @quota_domains end |
#tier ⇒ Object (readonly)
Returns the value of attribute tier
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def tier @tier end |
#tokenizer_evidence ⇒ Object (readonly)
Returns the value of attribute tokenizer_evidence
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def tokenizer_evidence @tokenizer_evidence end |
#weight_inputs ⇒ Object (readonly)
Returns the value of attribute weight_inputs
286 287 288 |
# File 'lib/legion/extensions/llm/inventory/records.rb', line 286 def weight_inputs @weight_inputs end |