Class: Retell::SDK::Unofficial::RetellLLM

Inherits:
Base
  • Object
show all
Defined in:
lib/retell/sdk/unofficial/retell_llm.rb

Instance Attribute Summary

Attributes inherited from Base

#changed_attributes, #client

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #each, each_attribute, #fetch, inherited, #initialize, #keys, #to_h, #values, writeable_attributes

Constructor Details

This class inherits a constructor from Retell::SDK::Unofficial::Base

Instance Method Details

#deleteObject



53
54
55
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 53

def delete
  @client.retell_llm.delete(self)
end

#idObject



17
18
19
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 17

def id
  llm_id
end

#retrieveObject



35
36
37
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 35

def retrieve
  @client.retell_llm.retrieve(self)
end

#update(**params) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 39

def update(**params)
  update_params = @changed_attributes.merge(params)

  if update_params.any?
    updated_retell_llm = @client.retell_llm.update(self, **update_params)
    self.class.attributes.each do |attr|
      instance_variable_set("@#{attr}", updated_retell_llm.send(attr))
    end
    @changed_attributes.clear
  end

  self
end

#urlObject



25
26
27
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 25

def url
  llm_websocket_url
end

#websocket_urlObject



21
22
23
# File 'lib/retell/sdk/unofficial/retell_llm.rb', line 21

def websocket_url
  llm_websocket_url
end