Class: Twilio::REST::Assistants::V1::AssistantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::AssistantInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/assistant.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Assistant resource.
-
#assistants_knowledge ⇒ assistants_knowledge
Access the assistants_knowledge.
-
#assistants_tools ⇒ assistants_tools
Access the assistants_tools.
-
#context ⇒ AssistantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#customer_ai ⇒ Hash
The Personalization and Perception Engine settings.
-
#date_created ⇒ Time
The date and time in GMT when the Assistant was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the Assistant was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the AssistantInstance.
-
#feedbacks ⇒ feedbacks
Access the feedbacks.
-
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance.
-
#id ⇒ String
The Assistant ID.
-
#initialize(version, payload, id: nil) ⇒ AssistantInstance
constructor
Initialize the AssistantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#knowledge ⇒ Array<AssistantsV1ServiceKnowledge>
The list of knowledge sources associated with the assistant.
-
#messages ⇒ messages
Access the messages.
-
#model ⇒ String
The default model used by the assistant.
-
#name ⇒ String
The name of the assistant.
-
#owner ⇒ String
The owner/company of the assistant.
-
#personality_prompt ⇒ String
The personality prompt to be used for assistant.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#tools ⇒ Array<AssistantsV1ServiceTool>
The list of tools associated with the assistant.
-
#update(assistants_v1_service_update_assistant_request: :unset) ⇒ AssistantInstance
Update the AssistantInstance.
-
#url ⇒ String
The url of the assistant resource.
Constructor Details
#initialize(version, payload, id: nil) ⇒ AssistantInstance
Initialize the AssistantInstance
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 745 def initialize(version, payload , id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'customer_ai' => payload['customer_ai'], 'id' => payload['id'], 'model' => payload['model'], 'name' => payload['name'], 'owner' => payload['owner'], 'url' => payload['url'], 'personality_prompt' => payload['personality_prompt'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'knowledge' => payload['knowledge'], 'tools' => payload['tools'], } # Context @instance_context = nil @params = { 'id' => id || @properties['id'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Assistant resource.
783 784 785 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 783 def account_sid @properties['account_sid'] end |
#assistants_knowledge ⇒ assistants_knowledge
Access the assistants_knowledge
905 906 907 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 905 def assistants_knowledge context.assistants_knowledge end |
#assistants_tools ⇒ assistants_tools
Access the assistants_tools
898 899 900 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 898 def assistants_tools context.assistants_tools end |
#context ⇒ AssistantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
774 775 776 777 778 779 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 774 def context unless @instance_context @instance_context = AssistantContext.new(@version , @params['id']) end @instance_context end |
#customer_ai ⇒ Hash
Returns The Personalization and Perception Engine settings.
789 790 791 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 789 def customer_ai @properties['customer_ai'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the Assistant was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
831 832 833 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 831 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Assistant was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
837 838 839 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 837 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AssistantInstance
856 857 858 859 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 856 def delete context.delete end |
#feedbacks ⇒ feedbacks
Access the feedbacks
884 885 886 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 884 def feedbacks context.feedbacks end |
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance
864 865 866 867 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 864 def fetch context.fetch end |
#id ⇒ String
Returns The Assistant ID.
795 796 797 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 795 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
918 919 920 921 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 918 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Assistants.V1.AssistantInstance #{values}>" end |
#knowledge ⇒ Array<AssistantsV1ServiceKnowledge>
Returns The list of knowledge sources associated with the assistant.
843 844 845 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 843 def knowledge @properties['knowledge'] end |
#messages ⇒ messages
Access the messages
891 892 893 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 891 def context. end |
#model ⇒ String
Returns The default model used by the assistant.
801 802 803 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 801 def model @properties['model'] end |
#name ⇒ String
Returns The name of the assistant.
807 808 809 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 807 def name @properties['name'] end |
#owner ⇒ String
Returns The owner/company of the assistant.
813 814 815 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 813 def owner @properties['owner'] end |
#personality_prompt ⇒ String
Returns The personality prompt to be used for assistant.
825 826 827 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 825 def personality_prompt @properties['personality_prompt'] end |
#to_s ⇒ Object
Provide a user friendly representation
911 912 913 914 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 911 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Assistants.V1.AssistantInstance #{values}>" end |
#tools ⇒ Array<AssistantsV1ServiceTool>
Returns The list of tools associated with the assistant.
849 850 851 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 849 def tools @properties['tools'] end |
#update(assistants_v1_service_update_assistant_request: :unset) ⇒ AssistantInstance
Update the AssistantInstance
873 874 875 876 877 878 879 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 873 def update(assistants_v1_service_update_assistant_request: :unset ) context.update( assistants_v1_service_update_assistant_request: assistants_v1_service_update_assistant_request, ) end |
#url ⇒ String
Returns The url of the assistant resource.
819 820 821 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant.rb', line 819 def url @properties['url'] end |