Module: RubyConversations::Concerns::MessageApiAttributes

Extended by:
ActiveSupport::Concern
Included in:
Message
Defined in:
lib/ruby_conversations/concerns/message_api_attributes.rb

Overview

Handles API-related attribute functionality for Message

Instance Method Summary collapse

Instance Method Details

#message_attributes_for_apiObject



11
12
13
14
15
16
17
18
19
# File 'lib/ruby_conversations/concerns/message_api_attributes.rb', line 11

def message_attributes_for_api
  {
    request: request,
    response: response,
    model_identifier: model_identifier,
    change_description: change_description,
    llm: llm
  }.compact
end

#message_base_attributesObject



21
22
23
24
25
26
27
28
# File 'lib/ruby_conversations/concerns/message_api_attributes.rb', line 21

def message_base_attributes
  {
    'request' => request,
    'response' => response,
    'model_identifier' => model_identifier,
    'change_description' => change_description
  }
end

#remote_attributesObject



30
31
32
# File 'lib/ruby_conversations/concerns/message_api_attributes.rb', line 30

def remote_attributes
  base_attributes.compact
end