twilio.rest.preview.understand.assistant package

Submodules

twilio.rest.preview.understand.assistant.assistant_fallback_actions module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/assistant_fallback_actions.py:docstring of twilio.rest.preview.understand.assistant.assistant_fallback_actions, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsContext(version, assistant_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

fetch()[source]

Fetch the AssistantFallbackActionsInstance

Returns:The fetched AssistantFallbackActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance
update(fallback_actions=<object object>)[source]

Update the AssistantFallbackActionsInstance

Parameters:fallback_actions (dict) – The fallback_actions
Returns:The updated AssistantFallbackActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance
class twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance(version, payload, assistant_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The account_sid
Return type:unicode
assistant_sid
Returns:The assistant_sid
Return type:unicode
data
Returns:The data
Return type:dict
fetch()[source]

Fetch the AssistantFallbackActionsInstance

Returns:The fetched AssistantFallbackActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance
update(fallback_actions=<object object>)[source]

Update the AssistantFallbackActionsInstance

Parameters:fallback_actions (dict) – The fallback_actions
Returns:The updated AssistantFallbackActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance
url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get()[source]

Constructs a AssistantFallbackActionsContext

Returns:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsContext
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsContext
class twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of AssistantFallbackActionsInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsInstance

twilio.rest.preview.understand.assistant.assistant_initiation_actions module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/assistant_initiation_actions.py:docstring of twilio.rest.preview.understand.assistant.assistant_initiation_actions, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsContext(version, assistant_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

fetch()[source]

Fetch the AssistantInitiationActionsInstance

Returns:The fetched AssistantInitiationActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
update(initiation_actions=<object object>)[source]

Update the AssistantInitiationActionsInstance

Parameters:initiation_actions (dict) – The initiation_actions
Returns:The updated AssistantInitiationActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
class twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance(version, payload, assistant_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The account_sid
Return type:unicode
assistant_sid
Returns:The assistant_sid
Return type:unicode
data
Returns:The data
Return type:dict
fetch()[source]

Fetch the AssistantInitiationActionsInstance

Returns:The fetched AssistantInitiationActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
update(initiation_actions=<object object>)[source]

Update the AssistantInitiationActionsInstance

Parameters:initiation_actions (dict) – The initiation_actions
Returns:The updated AssistantInitiationActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get()[source]

Constructs a AssistantInitiationActionsContext

Returns:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsContext
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsContext
class twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of AssistantInitiationActionsInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance

twilio.rest.preview.understand.assistant.dialogue module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/dialogue.py:docstring of twilio.rest.preview.understand.assistant.dialogue, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.dialogue.DialogueContext(version, assistant_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

fetch()[source]

Fetch the DialogueInstance

Returns:The fetched DialogueInstance
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
class twilio.rest.preview.understand.assistant.dialogue.DialogueInstance(version, payload, assistant_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The unique ID of the Account that created this Field.
Return type:unicode
assistant_sid
Returns:The unique ID of the parent Assistant.
Return type:unicode
data
Returns:The dialogue memory object as json
Return type:dict
fetch()[source]

Fetch the DialogueInstance

Returns:The fetched DialogueInstance
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
sid
Returns:The unique ID of the Dialogue
Return type:unicode
url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.dialogue.DialogueList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get(sid)[source]

Constructs a DialogueContext

Parameters:sid – The sid
Returns:twilio.rest.preview.understand.assistant.dialogue.DialogueContext
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueContext
class twilio.rest.preview.understand.assistant.dialogue.DialoguePage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of DialogueInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueInstance

twilio.rest.preview.understand.assistant.model_build module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/model_build.py:docstring of twilio.rest.preview.understand.assistant.model_build, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.model_build.ModelBuildContext(version, assistant_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

delete()[source]

Deletes the ModelBuildInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ModelBuildInstance

Returns:The fetched ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance
update(unique_name=<object object>)[source]

Update the ModelBuildInstance

Parameters:unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
Returns:The updated ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance
class twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance(version, payload, assistant_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

class Status[source]

Bases: object

BUILDING = 'building'
CANCELED = 'canceled'
COMPLETED = 'completed'
ENQUEUED = 'enqueued'
FAILED = 'failed'
account_sid
Returns:The unique ID of the Account that created this Model Build.
Return type:unicode
assistant_sid
Returns:The unique ID of the parent Assistant.
Return type:unicode
build_duration
Returns:The time in seconds it took to build the model.
Return type:unicode
date_created
Returns:The date that this resource was created
Return type:datetime
date_updated
Returns:The date that this resource was last updated
Return type:datetime
delete()[source]

Deletes the ModelBuildInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
error_code
Returns:The error_code
Return type:unicode
fetch()[source]

Fetch the ModelBuildInstance

Returns:The fetched ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
status
Returns:A string that described the model build status. The values can be: enqueued, building, completed, failed
Return type:ModelBuildInstance.Status
unique_name
Returns:A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
Return type:unicode
update(unique_name=<object object>)[source]

Update the ModelBuildInstance

Parameters:unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
Returns:The updated ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance
url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.model_build.ModelBuildList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

create(status_callback=<object object>, unique_name=<object object>)[source]

Create the ModelBuildInstance

Parameters:
  • status_callback (unicode) – The status_callback
  • unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
Returns:

The created ModelBuildInstance

Return type:

twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance

get(sid)[source]

Constructs a ModelBuildContext

Parameters:sid – The sid
Returns:twilio.rest.preview.understand.assistant.model_build.ModelBuildContext
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildContext
get_page(target_url)[source]

Retrieve a specific page of ModelBuildInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildPage
list(limit=None, page_size=None)[source]

Lists ModelBuildInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of ModelBuildInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of ModelBuildInstance

Return type:

twilio.rest.preview.understand.assistant.model_build.ModelBuildPage

stream(limit=None, page_size=None)[source]

Streams ModelBuildInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance]

class twilio.rest.preview.understand.assistant.model_build.ModelBuildPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of ModelBuildInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildInstance

twilio.rest.preview.understand.assistant.query module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/query.py:docstring of twilio.rest.preview.understand.assistant.query, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.query.QueryContext(version, assistant_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

delete()[source]

Deletes the QueryInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the QueryInstance

Returns:The fetched QueryInstance
Return type:twilio.rest.preview.understand.assistant.query.QueryInstance
update(sample_sid=<object object>, status=<object object>)[source]

Update the QueryInstance

Parameters:
  • sample_sid (unicode) – An optional reference to the Sample created from this query.
  • status (unicode) – A string that described the query status. The values can be: pending_review, reviewed, discarded
Returns:

The updated QueryInstance

Return type:

twilio.rest.preview.understand.assistant.query.QueryInstance

class twilio.rest.preview.understand.assistant.query.QueryInstance(version, payload, assistant_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The unique ID of the Account that created this Query.
Return type:unicode
assistant_sid
Returns:The unique ID of the parent Assistant.
Return type:unicode
date_created
Returns:The date that this resource was created
Return type:datetime
date_updated
Returns:The date that this resource was last updated
Return type:datetime
delete()[source]

Deletes the QueryInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the QueryInstance

Returns:The fetched QueryInstance
Return type:twilio.rest.preview.understand.assistant.query.QueryInstance
language
Returns:An ISO language-country string of the sample.
Return type:unicode
model_build_sid
Returns:The unique ID of the Model Build queried.
Return type:unicode
query
Returns:The end-user’s natural language input.
Return type:unicode
results
Returns:The natural language analysis results which include the Task recognized, the confidence score and a list of identified Fields.
Return type:dict
sample_sid
Returns:An optional reference to the Sample created from this query.
Return type:unicode
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
source_channel
Returns:The communication channel where this end-user input came from
Return type:unicode
status
Returns:A string that described the query status. The values can be: pending_review, reviewed, discarded
Return type:unicode
update(sample_sid=<object object>, status=<object object>)[source]

Update the QueryInstance

Parameters:
  • sample_sid (unicode) – An optional reference to the Sample created from this query.
  • status (unicode) – A string that described the query status. The values can be: pending_review, reviewed, discarded
Returns:

The updated QueryInstance

Return type:

twilio.rest.preview.understand.assistant.query.QueryInstance

url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.query.QueryList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

create(language, query, tasks=<object object>, model_build=<object object>, field=<object object>)[source]

Create the QueryInstance

Parameters:
  • language (unicode) – An ISO language-country string of the sample.
  • query (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long.
  • tasks (unicode) – Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated task-unique-name-1, task-unique-name-2
  • model_build (unicode) – The Model Build Sid or unique name of the Model Build to be queried.
  • field (unicode) – Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format task-unique-name-1:field-unique-name
Returns:

The created QueryInstance

Return type:

twilio.rest.preview.understand.assistant.query.QueryInstance

get(sid)[source]

Constructs a QueryContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.preview.understand.assistant.query.QueryContext
Return type:twilio.rest.preview.understand.assistant.query.QueryContext
get_page(target_url)[source]

Retrieve a specific page of QueryInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of QueryInstance
Return type:twilio.rest.preview.understand.assistant.query.QueryPage
list(language=<object object>, model_build=<object object>, status=<object object>, limit=None, page_size=None)[source]

Lists QueryInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • language (unicode) – An ISO language-country string of the sample.
  • model_build (unicode) – The Model Build Sid or unique name of the Model Build to be queried.
  • status (unicode) – A string that described the query status. The values can be: pending_review, reviewed, discarded
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.query.QueryInstance]

page(language=<object object>, model_build=<object object>, status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of QueryInstance records from the API. Request is executed immediately

Parameters:
  • language (unicode) – An ISO language-country string of the sample.
  • model_build (unicode) – The Model Build Sid or unique name of the Model Build to be queried.
  • status (unicode) – A string that described the query status. The values can be: pending_review, reviewed, discarded
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of QueryInstance

Return type:

twilio.rest.preview.understand.assistant.query.QueryPage

stream(language=<object object>, model_build=<object object>, status=<object object>, limit=None, page_size=None)[source]

Streams QueryInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • language (unicode) – An ISO language-country string of the sample.
  • model_build (unicode) – The Model Build Sid or unique name of the Model Build to be queried.
  • status (unicode) – A string that described the query status. The values can be: pending_review, reviewed, discarded
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.query.QueryInstance]

class twilio.rest.preview.understand.assistant.query.QueryPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of QueryInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.query.QueryInstance
Return type:twilio.rest.preview.understand.assistant.query.QueryInstance

twilio.rest.preview.understand.assistant.style_sheet module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/style_sheet.py:docstring of twilio.rest.preview.understand.assistant.style_sheet, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.style_sheet.StyleSheetContext(version, assistant_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

fetch()[source]

Fetch the StyleSheetInstance

Returns:The fetched StyleSheetInstance
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance
update(style_sheet=<object object>)[source]

Update the StyleSheetInstance

Parameters:style_sheet (dict) – The JSON Style sheet string
Returns:The updated StyleSheetInstance
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance
class twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance(version, payload, assistant_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The unique ID of the Account that created this Assistant
Return type:unicode
assistant_sid
Returns:The unique ID of the Assistant
Return type:unicode
data
Returns:The JSON style sheet object
Return type:dict
fetch()[source]

Fetch the StyleSheetInstance

Returns:The fetched StyleSheetInstance
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance
update(style_sheet=<object object>)[source]

Update the StyleSheetInstance

Parameters:style_sheet (dict) – The JSON Style sheet string
Returns:The updated StyleSheetInstance
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance
url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.style_sheet.StyleSheetList(version, assistant_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get()[source]

Constructs a StyleSheetContext

Returns:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetContext
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetContext
class twilio.rest.preview.understand.assistant.style_sheet.StyleSheetPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of StyleSheetInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/preview/understand/assistant/__init__.py:docstring of twilio.rest.preview.understand.assistant, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.preview.understand.assistant.AssistantContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

assistant_fallback_actions

Access the assistant_fallback_actions

Returns:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsList
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsList
assistant_initiation_actions

Access the assistant_initiation_actions

Returns:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsList
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsList
delete()[source]

Deletes the AssistantInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
dialogues

Access the dialogues

Returns:twilio.rest.preview.understand.assistant.dialogue.DialogueList
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueList
fetch()[source]

Fetch the AssistantInstance

Returns:The fetched AssistantInstance
Return type:twilio.rest.preview.understand.assistant.AssistantInstance
field_types

Access the field_types

Returns:twilio.rest.preview.understand.assistant.field_type.FieldTypeList
Return type:twilio.rest.preview.understand.assistant.field_type.FieldTypeList
model_builds

Access the model_builds

Returns:twilio.rest.preview.understand.assistant.model_build.ModelBuildList
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildList
queries

Access the queries

Returns:twilio.rest.preview.understand.assistant.query.QueryList
Return type:twilio.rest.preview.understand.assistant.query.QueryList
style_sheet

Access the style_sheet

Returns:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetList
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetList
tasks

Access the tasks

Returns:twilio.rest.preview.understand.assistant.task.TaskList
Return type:twilio.rest.preview.understand.assistant.task.TaskList
update(friendly_name=<object object>, log_queries=<object object>, unique_name=<object object>, callback_url=<object object>, callback_events=<object object>, fallback_actions=<object object>, initiation_actions=<object object>, style_sheet=<object object>)[source]

Update the AssistantInstance

Parameters:
  • friendly_name (unicode) – A text description for the Assistant. It is non-unique and can up to 255 characters long.
  • log_queries (bool) – A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
  • unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
  • callback_url (unicode) – A user-provided URL to send event callbacks to.
  • callback_events (unicode) – Space-separated list of callback events that will trigger callbacks.
  • fallback_actions (dict) – The JSON actions to be executed when the user’s input is not recognized as matching any Task.
  • initiation_actions (dict) – The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.
  • style_sheet (dict) – The JSON object that holds the style sheet for the assistant
Returns:

The updated AssistantInstance

Return type:

twilio.rest.preview.understand.assistant.AssistantInstance

class twilio.rest.preview.understand.assistant.AssistantInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The unique ID of the Account that created this Assistant.
Return type:unicode
assistant_fallback_actions

Access the assistant_fallback_actions

Returns:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsList
Return type:twilio.rest.preview.understand.assistant.assistant_fallback_actions.AssistantFallbackActionsList
assistant_initiation_actions

Access the assistant_initiation_actions

Returns:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsList
Return type:twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsList
callback_events
Returns:Space-separated list of callback events that will trigger callbacks.
Return type:unicode
callback_url
Returns:A user-provided URL to send event callbacks to.
Return type:unicode
date_created
Returns:The date that this resource was created
Return type:datetime
date_updated
Returns:The date that this resource was last updated
Return type:datetime
delete()[source]

Deletes the AssistantInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
dialogues

Access the dialogues

Returns:twilio.rest.preview.understand.assistant.dialogue.DialogueList
Return type:twilio.rest.preview.understand.assistant.dialogue.DialogueList
fetch()[source]

Fetch the AssistantInstance

Returns:The fetched AssistantInstance
Return type:twilio.rest.preview.understand.assistant.AssistantInstance
field_types

Access the field_types

Returns:twilio.rest.preview.understand.assistant.field_type.FieldTypeList
Return type:twilio.rest.preview.understand.assistant.field_type.FieldTypeList
friendly_name
Returns:A text description for the Assistant. It is non-unique and can up to 255 characters long.
Return type:unicode
latest_model_build_sid
Returns:The unique ID (Sid) of the latest model build. Null if no model has been built.
Return type:unicode
Returns:The links
Return type:unicode
log_queries
Returns:A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter.
Return type:bool
model_builds

Access the model_builds

Returns:twilio.rest.preview.understand.assistant.model_build.ModelBuildList
Return type:twilio.rest.preview.understand.assistant.model_build.ModelBuildList
queries

Access the queries

Returns:twilio.rest.preview.understand.assistant.query.QueryList
Return type:twilio.rest.preview.understand.assistant.query.QueryList
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
style_sheet

Access the style_sheet

Returns:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetList
Return type:twilio.rest.preview.understand.assistant.style_sheet.StyleSheetList
tasks

Access the tasks

Returns:twilio.rest.preview.understand.assistant.task.TaskList
Return type:twilio.rest.preview.understand.assistant.task.TaskList
unique_name
Returns:A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path. Unique up to 64 characters long.
Return type:unicode
update(friendly_name=<object object>, log_queries=<object object>, unique_name=<object object>, callback_url=<object object>, callback_events=<object object>, fallback_actions=<object object>, initiation_actions=<object object>, style_sheet=<object object>)[source]

Update the AssistantInstance

Parameters:
  • friendly_name (unicode) – A text description for the Assistant. It is non-unique and can up to 255 characters long.
  • log_queries (bool) – A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
  • unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
  • callback_url (unicode) – A user-provided URL to send event callbacks to.
  • callback_events (unicode) – Space-separated list of callback events that will trigger callbacks.
  • fallback_actions (dict) – The JSON actions to be executed when the user’s input is not recognized as matching any Task.
  • initiation_actions (dict) – The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.
  • style_sheet (dict) – The JSON object that holds the style sheet for the assistant
Returns:

The updated AssistantInstance

Return type:

twilio.rest.preview.understand.assistant.AssistantInstance

url
Returns:The url
Return type:unicode
class twilio.rest.preview.understand.assistant.AssistantList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

create(friendly_name=<object object>, log_queries=<object object>, unique_name=<object object>, callback_url=<object object>, callback_events=<object object>, fallback_actions=<object object>, initiation_actions=<object object>, style_sheet=<object object>)[source]

Create the AssistantInstance

Parameters:
  • friendly_name (unicode) – A text description for the Assistant. It is non-unique and can up to 255 characters long.
  • log_queries (bool) – A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
  • unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
  • callback_url (unicode) – A user-provided URL to send event callbacks to.
  • callback_events (unicode) – Space-separated list of callback events that will trigger callbacks.
  • fallback_actions (dict) – The JSON actions to be executed when the user’s input is not recognized as matching any Task.
  • initiation_actions (dict) – The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.
  • style_sheet (dict) – The JSON object that holds the style sheet for the assistant
Returns:

The created AssistantInstance

Return type:

twilio.rest.preview.understand.assistant.AssistantInstance

get(sid)[source]

Constructs a AssistantContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.preview.understand.assistant.AssistantContext
Return type:twilio.rest.preview.understand.assistant.AssistantContext
get_page(target_url)[source]

Retrieve a specific page of AssistantInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of AssistantInstance
Return type:twilio.rest.preview.understand.assistant.AssistantPage
list(limit=None, page_size=None)[source]

Lists AssistantInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.AssistantInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of AssistantInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of AssistantInstance

Return type:

twilio.rest.preview.understand.assistant.AssistantPage

stream(limit=None, page_size=None)[source]

Streams AssistantInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.preview.understand.assistant.AssistantInstance]

class twilio.rest.preview.understand.assistant.AssistantPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of AssistantInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.preview.understand.assistant.AssistantInstance
Return type:twilio.rest.preview.understand.assistant.AssistantInstance