Class: VoiceML::AssistantsV1KnowledgeChunk

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/assistants_v1.rb

Overview

AssistantsV1KnowledgeChunk — single retrieved chunk of indexed Knowledge content.

Constant Summary collapse

ATTRIBUTES =
%w[account_sid content metadata date_created date_updated].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ AssistantsV1KnowledgeChunk

Returns a new instance of AssistantsV1KnowledgeChunk.



126
127
128
# File 'lib/voiceml/models/assistants_v1.rb', line 126

def initialize(attrs = {})
  ATTRIBUTES.each { |f| instance_variable_set("@#{f}", attrs.key?(f) ? attrs[f] : attrs[f.to_sym]) }
end

Class Method Details

.from_hash(h) ⇒ Object



129
# File 'lib/voiceml/models/assistants_v1.rb', line 129

def self.from_hash(h); h.nil? ? nil : new(h); end