Class: Legion::Extensions::Llm::Fleet::ProviderResponder::FleetEnvelope

Inherits:
Struct
  • Object
show all
Defined in:
lib/legion/extensions/llm/fleet/provider_responder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



37
38
39
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 37

def data
  @data
end

Instance Method Details

#[](key) ⇒ Object



38
39
40
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 38

def [](key)
  data[key.to_sym] || data[key.to_s]
end

#correlation_idObject



53
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 53

def correlation_id = self[:correlation_id]

#execution_contractObject



63
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 63

def execution_contract = self[:execution_contract]

#fetch(key, default = nil) ⇒ Object



46
47
48
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 46

def fetch(key, default = nil)
  key?(key) ? self[key] : default
end

#idempotency_keyObject



54
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 54

def idempotency_key = self[:idempotency_key]

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 42

def key?(key)
  data.key?(key.to_sym) || data.key?(key.to_s)
end

#message_contextObject



61
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 61

def message_context = self[:message_context] || {}

#modelObject



58
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 58

def model = self[:model]

#offering_idObject



64
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 64

def offering_id = self[:offering_id]

#operationObject



55
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 55

def operation = self[:operation]

#paramsObject



59
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 59

def params = self[:params] || {}

#protocol_versionObject



51
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 51

def protocol_version = self[:protocol_version]

#providerObject



56
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 56

def provider = self[:provider]

#provider_instanceObject



57
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 57

def provider_instance = self[:provider_instance]

#reply_toObject



60
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 60

def reply_to = self[:reply_to]

#request_idObject



52
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 52

def request_id = self[:request_id]

#to_hObject



50
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 50

def to_h = data

#trace_contextObject



62
# File 'lib/legion/extensions/llm/fleet/provider_responder.rb', line 62

def trace_context = self[:trace_context] || {}