Class: ActiveAgent::Providers::Mock::Request

Inherits:
Common::BaseModel show all
Defined in:
lib/active_agent/providers/mock/request.rb

Overview

Request model for Mock provider.

Simplified request model that accepts messages and basic parameters.

Instance Method Summary collapse

Methods inherited from Common::BaseModel

#<=>, #==, attribute, #deep_compact, #deep_dup, delegate_attributes, drop_attributes, inherited, #initialize, #inspect, keys, #merge!, required_attributes, #serialize, #to_h, #to_hash

Constructor Details

This class inherits a constructor from ActiveAgent::Providers::Common::BaseModel

Instance Method Details

#message=(value) ⇒ Object

Common Format Compatibility



27
28
29
30
# File 'lib/active_agent/providers/mock/request.rb', line 27

def message=(value)
  self.messages ||= []
  self.messages << value
end

#response_formatObject



32
33
34
# File 'lib/active_agent/providers/mock/request.rb', line 32

def response_format
  { type: "text" }
end