ibm_watson.assistant_v1 module

The IBM Watson™ Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation flows between your apps and your users. The Assistant v1 API provides authoring methods your application can use to create or update a workspace.

class AssistantV1(version: str, authenticator: ibm_cloud_sdk_core.authenticators.authenticator.Authenticator = None, service_name: str = 'assistant')[source]

Bases: ibm_cloud_sdk_core.base_service.BaseService

The Assistant V1 service.

DEFAULT_SERVICE_URL = 'https://api.us-south.assistant.watson.cloud.ibm.com'
DEFAULT_SERVICE_NAME = 'assistant'
message(workspace_id: str, *, input: Optional[ibm_watson.assistant_v1.MessageInput] = None, intents: List[RuntimeIntent] = None, entities: List[RuntimeEntity] = None, alternate_intents: bool = None, context: Optional[ibm_watson.assistant_v1.Context] = None, output: Optional[ibm_watson.assistant_v1.OutputData] = None, nodes_visited_details: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get response to user input.

Send user input to a workspace and receive a response. Important: This method has been superseded by the new v2 runtime API. The v2 API offers significant advantages, including ease of deployment, automatic state management, versioning, and search capabilities. For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • input (MessageInput) – (optional) An input object that includes the input text.

  • intents (List[RuntimeIntent]) – (optional) Intents to use when evaluating the user input. Include intents from the previous response to continue using those intents rather than trying to recognize intents in the new input.

  • entities (List[RuntimeEntity]) – (optional) Entities to use when evaluating the message. Include entities from the previous response to continue using those entities rather than detecting entities in the new input.

  • alternate_intents (bool) – (optional) Whether to return more than one intent. A value of true indicates that all matching intents are returned.

  • context (Context) – (optional) State information for the conversation. To maintain state, include the context from the previous response.

  • output (OutputData) – (optional) An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log.

  • nodes_visited_details (bool) – (optional) Whether to include additional diagnostic information about the dialog nodes that were visited during processing of the message.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_workspaces(*, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List workspaces.

List the workspaces associated with a Watson Assistant service instance.

Parameters
  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned workspaces will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_workspace(*, name: str = None, description: str = None, language: str = None, metadata: dict = None, learning_opt_out: bool = None, system_settings: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettings] = None, intents: List[CreateIntent] = None, entities: List[CreateEntity] = None, dialog_nodes: List[DialogNode] = None, counterexamples: List[Counterexample] = None, webhooks: List[Webhook] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create workspace.

Create a workspace based on component objects. You must provide workspace components defining the content of the new workspace.

Parameters
  • name (str) – (optional) The name of the workspace. This string cannot contain carriage return, newline, or tab characters.

  • description (str) – (optional) The description of the workspace. This string cannot contain carriage return, newline, or tab characters.

  • language (str) – (optional) The language of the workspace.

  • metadata (dict) – (optional) Any metadata related to the workspace.

  • learning_opt_out (bool) – (optional) Whether training data from the workspace (including artifacts such as intents and entities) can be used by IBM for general service improvements. true indicates that workspace training data is not to be used.

  • system_settings (WorkspaceSystemSettings) – (optional) Global settings for the workspace.

  • intents (List[CreateIntent]) – (optional) An array of objects defining the intents for the workspace.

  • entities (List[CreateEntity]) – (optional) An array of objects describing the entities for the workspace.

  • dialog_nodes (List[DialogNode]) – (optional) An array of objects describing the dialog nodes in the workspace.

  • counterexamples (List[Counterexample]) – (optional) An array of objects defining input examples that have been marked as irrelevant input.

  • webhooks (List[Webhook]) – (optional)

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_workspace(workspace_id: str, *, export: bool = None, include_audit: bool = None, sort: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get information about a workspace.

Get information about a workspace, optionally including all workspace content.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • sort (str) – (optional) Indicates how the returned workspace data will be sorted. This parameter is valid only if **export**=`true`. Specify sort=stable to sort all workspace objects by unique identifier, in ascending alphabetical order.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_workspace(workspace_id: str, *, name: str = None, description: str = None, language: str = None, metadata: dict = None, learning_opt_out: bool = None, system_settings: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettings] = None, intents: List[CreateIntent] = None, entities: List[CreateEntity] = None, dialog_nodes: List[DialogNode] = None, counterexamples: List[Counterexample] = None, webhooks: List[Webhook] = None, append: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update workspace.

Update an existing workspace with new or modified data. You must provide component objects defining the content of the updated workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • name (str) – (optional) The name of the workspace. This string cannot contain carriage return, newline, or tab characters.

  • description (str) – (optional) The description of the workspace. This string cannot contain carriage return, newline, or tab characters.

  • language (str) – (optional) The language of the workspace.

  • metadata (dict) – (optional) Any metadata related to the workspace.

  • learning_opt_out (bool) – (optional) Whether training data from the workspace (including artifacts such as intents and entities) can be used by IBM for general service improvements. true indicates that workspace training data is not to be used.

  • system_settings (WorkspaceSystemSettings) – (optional) Global settings for the workspace.

  • intents (List[CreateIntent]) – (optional) An array of objects defining the intents for the workspace.

  • entities (List[CreateEntity]) – (optional) An array of objects describing the entities for the workspace.

  • dialog_nodes (List[DialogNode]) – (optional) An array of objects describing the dialog nodes in the workspace.

  • counterexamples (List[Counterexample]) – (optional) An array of objects defining input examples that have been marked as irrelevant input.

  • webhooks (List[Webhook]) – (optional)

  • append (bool) – (optional) Whether the new data is to be appended to the existing data in the object. If append**=`false`, elements included in the new data completely replace the corresponding existing elements, including all subelements. For example, if the new data for a workspace includes **entities and **append**=`false`, all existing entities in the workspace are discarded and replaced with the new entities. If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in the new data collide with existing elements, the update request fails.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_workspace(workspace_id: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete workspace.

Delete a workspace from the service instance.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_intents(workspace_id: str, *, export: bool = None, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List intents.

List the intents for a workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned intents will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_intent(workspace_id: str, intent: str, *, description: str = None, examples: List[Example] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create intent.

Create a new intent. If you want to create multiple intents with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The name of the intent. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. - It cannot begin with the reserved prefix sys-.

  • description (str) – (optional) The description of the intent. This string cannot contain carriage return, newline, or tab characters.

  • examples (List[Example]) – (optional) An array of user input examples for the intent.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_intent(workspace_id: str, intent: str, *, export: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get intent.

Get information about an intent, optionally including all intent content.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_intent(workspace_id: str, intent: str, *, new_intent: str = None, new_description: str = None, new_examples: List[Example] = None, append: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update intent.

Update an existing intent with new or modified data. You must provide component objects defining the content of the updated intent. If you want to update multiple intents with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • new_intent (str) – (optional) The name of the intent. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. - It cannot begin with the reserved prefix sys-.

  • new_description (str) – (optional) The description of the intent. This string cannot contain carriage return, newline, or tab characters.

  • new_examples (List[Example]) – (optional) An array of user input examples for the intent.

  • append (bool) – (optional) Whether the new data is to be appended to the existing data in the object. If append**=`false`, elements included in the new data completely replace the corresponding existing elements, including all subelements. For example, if the new data for the intent includes **examples and **append**=`false`, all existing examples for the intent are discarded and replaced with the new examples. If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in the new data collide with existing elements, the update request fails.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_intent(workspace_id: str, intent: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete intent.

Delete an intent from a workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_examples(workspace_id: str, intent: str, *, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List user input examples.

List the user input examples for an intent, optionally including contextual entity mentions.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned examples will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_example(workspace_id: str, intent: str, text: str, *, mentions: List[Mention] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create user input example.

Add a new user input example to an intent. If you want to add multiple examples with a single API call, consider using the [Update intent](#update-intent) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • text (str) – The text of a user input example. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • mentions (List[Mention]) – (optional) An array of contextual entity mentions.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_example(workspace_id: str, intent: str, text: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get user input example.

Get information about a user input example.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • text (str) – The text of the user input example.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_example(workspace_id: str, intent: str, text: str, *, new_text: str = None, new_mentions: List[Mention] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update user input example.

Update the text of a user input example. If you want to update multiple examples with a single API call, consider using the [Update intent](#update-intent) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • text (str) – The text of the user input example.

  • new_text (str) – (optional) The text of the user input example. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • new_mentions (List[Mention]) – (optional) An array of contextual entity mentions.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_example(workspace_id: str, intent: str, text: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete user input example.

Delete a user input example from an intent.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • intent (str) – The intent name.

  • text (str) – The text of the user input example.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_counterexamples(workspace_id: str, *, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List counterexamples.

List the counterexamples for a workspace. Counterexamples are examples that have been marked as irrelevant input.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned counterexamples will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_counterexample(workspace_id: str, text: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create counterexample.

Add a new counterexample to a workspace. Counterexamples are examples that have been marked as irrelevant input. If you want to add multiple counterexamples with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • text (str) – The text of a user input marked as irrelevant input. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_counterexample(workspace_id: str, text: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get counterexample.

Get information about a counterexample. Counterexamples are examples that have been marked as irrelevant input.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • text (str) – The text of a user input counterexample (for example, What are you wearing?).

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_counterexample(workspace_id: str, text: str, *, new_text: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update counterexample.

Update the text of a counterexample. Counterexamples are examples that have been marked as irrelevant input.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • text (str) – The text of a user input counterexample (for example, What are you wearing?).

  • new_text (str) – (optional) The text of a user input marked as irrelevant input. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_counterexample(workspace_id: str, text: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete counterexample.

Delete a counterexample from a workspace. Counterexamples are examples that have been marked as irrelevant input.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • text (str) – The text of a user input counterexample (for example, What are you wearing?).

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_entities(workspace_id: str, *, export: bool = None, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List entities.

List the entities for a workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned entities will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_entity(workspace_id: str, entity: str, *, description: str = None, metadata: dict = None, fuzzy_match: bool = None, values: List[CreateValue] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create entity.

Create a new entity, or enable a system entity. If you want to create multiple entities with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, and hyphen characters. - If you specify an entity name beginning with the reserved prefix sys-, it must be the name of a system entity that you want to enable. (Any entity content specified with the request is ignored.).

  • description (str) – (optional) The description of the entity. This string cannot contain carriage return, newline, or tab characters.

  • metadata (dict) – (optional) Any metadata related to the entity.

  • fuzzy_match (bool) – (optional) Whether to use fuzzy matching for the entity.

  • values (List[CreateValue]) – (optional) An array of objects describing the entity values.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_entity(workspace_id: str, entity: str, *, export: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get entity.

Get information about an entity, optionally including all entity content.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_entity(workspace_id: str, entity: str, *, new_entity: str = None, new_description: str = None, new_metadata: dict = None, new_fuzzy_match: bool = None, new_values: List[CreateValue] = None, append: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update entity.

Update an existing entity with new or modified data. You must provide component objects defining the content of the updated entity. If you want to update multiple entities with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • new_entity (str) – (optional) The name of the entity. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, and hyphen characters. - It cannot begin with the reserved prefix sys-.

  • new_description (str) – (optional) The description of the entity. This string cannot contain carriage return, newline, or tab characters.

  • new_metadata (dict) – (optional) Any metadata related to the entity.

  • new_fuzzy_match (bool) – (optional) Whether to use fuzzy matching for the entity.

  • new_values (List[CreateValue]) – (optional) An array of objects describing the entity values.

  • append (bool) – (optional) Whether the new data is to be appended to the existing data in the entity. If append**=`false`, elements included in the new data completely replace the corresponding existing elements, including all subelements. For example, if the new data for the entity includes **values and **append**=`false`, all existing values for the entity are discarded and replaced with the new values. If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in the new data collide with existing elements, the update request fails.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_entity(workspace_id: str, entity: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete entity.

Delete an entity from a workspace, or disable a system entity.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_mentions(workspace_id: str, entity: str, *, export: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List entity mentions.

List mentions for a contextual entity. An entity mention is an occurrence of a contextual entity in the context of an intent user input example.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_values(workspace_id: str, entity: str, *, export: bool = None, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List entity values.

List the values for an entity.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned entity values will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_value(workspace_id: str, entity: str, value: str, *, metadata: dict = None, type: str = None, synonyms: List[str] = None, patterns: List[str] = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create entity value.

Create a new value for an entity. If you want to create multiple entity values with a single API call, consider using the [Update entity](#update-entity) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • metadata (dict) – (optional) Any metadata related to the entity value.

  • type (str) – (optional) Specifies the type of entity value.

  • synonyms (List[str]) – (optional) An array of synonyms for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A synonym must conform to the following resrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • patterns (List[str]) – (optional) An array of patterns for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A pattern is a regular expression; for more information about how to specify a pattern, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_value(workspace_id: str, entity: str, value: str, *, export: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get entity value.

Get information about an entity value.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • export (bool) – (optional) Whether to include all element content in the returned data. If **export**=`false`, the returned data includes only information about the element itself. If **export**=`true`, all content, including subelements, is included.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_value(workspace_id: str, entity: str, value: str, *, new_value: str = None, new_metadata: dict = None, new_type: str = None, new_synonyms: List[str] = None, new_patterns: List[str] = None, append: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update entity value.

Update an existing entity value with new or modified data. You must provide component objects defining the content of the updated entity value. If you want to update multiple entity values with a single API call, consider using the [Update entity](#update-entity) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • new_value (str) – (optional) The text of the entity value. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • new_metadata (dict) – (optional) Any metadata related to the entity value.

  • new_type (str) – (optional) Specifies the type of entity value.

  • new_synonyms (List[str]) – (optional) An array of synonyms for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A synonym must conform to the following resrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • new_patterns (List[str]) – (optional) An array of patterns for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A pattern is a regular expression; for more information about how to specify a pattern, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).

  • append (bool) – (optional) Whether the new data is to be appended to the existing data in the entity value. If append**=`false`, elements included in the new data completely replace the corresponding existing elements, including all subelements. For example, if the new data for the entity value includes **synonyms and **append**=`false`, all existing synonyms for the entity value are discarded and replaced with the new synonyms. If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in the new data collide with existing elements, the update request fails.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_value(workspace_id: str, entity: str, value: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete entity value.

Delete a value from an entity.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_synonyms(workspace_id: str, entity: str, value: str, *, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List entity value synonyms.

List the synonyms for an entity value.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned entity value synonyms will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_synonym(workspace_id: str, entity: str, value: str, synonym: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create entity value synonym.

Add a new synonym to an entity value. If you want to create multiple synonyms with a single API call, consider using the [Update entity](#update-entity) or [Update entity value](#update-entity-value) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • synonym (str) – The text of the synonym. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_synonym(workspace_id: str, entity: str, value: str, synonym: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get entity value synonym.

Get information about a synonym of an entity value.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • synonym (str) – The text of the synonym.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_synonym(workspace_id: str, entity: str, value: str, synonym: str, *, new_synonym: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update entity value synonym.

Update an existing entity value synonym with new text. If you want to update multiple synonyms with a single API call, consider using the [Update entity](#update-entity) or [Update entity value](#update-entity-value) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • synonym (str) – The text of the synonym.

  • new_synonym (str) – (optional) The text of the synonym. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_synonym(workspace_id: str, entity: str, value: str, synonym: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete entity value synonym.

Delete a synonym from an entity value.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • entity (str) – The name of the entity.

  • value (str) – The text of the entity value.

  • synonym (str) – The text of the synonym.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_dialog_nodes(workspace_id: str, *, page_limit: int = None, sort: str = None, cursor: str = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List dialog nodes.

List the dialog nodes for a workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • sort (str) – (optional) The attribute by which returned dialog nodes will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_dialog_node(workspace_id: str, dialog_node: str, *, description: str = None, conditions: str = None, parent: str = None, previous_sibling: str = None, output: Optional[ibm_watson.assistant_v1.DialogNodeOutput] = None, context: dict = None, metadata: dict = None, next_step: Optional[ibm_watson.assistant_v1.DialogNodeNextStep] = None, title: str = None, type: str = None, event_name: str = None, variable: str = None, actions: List[DialogNodeAction] = None, digress_in: str = None, digress_out: str = None, digress_out_slots: str = None, user_label: str = None, disambiguation_opt_out: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Create dialog node.

Create a new dialog node. If you want to create multiple dialog nodes with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • dialog_node (str) – The dialog node ID. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

  • description (str) – (optional) The description of the dialog node. This string cannot contain carriage return, newline, or tab characters.

  • conditions (str) – (optional) The condition that will trigger the dialog node. This string cannot contain carriage return, newline, or tab characters.

  • parent (str) – (optional) The ID of the parent dialog node. This property is omitted if the dialog node has no parent.

  • previous_sibling (str) – (optional) The ID of the previous sibling dialog node. This property is omitted if the dialog node has no previous sibling.

  • output (DialogNodeOutput) – (optional) The output of the dialog node. For more information about how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).

  • context (dict) – (optional) The context for the dialog node.

  • metadata (dict) – (optional) The metadata for the dialog node.

  • next_step (DialogNodeNextStep) – (optional) The next step to execute following this dialog node.

  • title (str) – (optional) The alias used to identify the dialog node. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

  • type (str) – (optional) How the dialog node is processed.

  • event_name (str) – (optional) How an event_handler node is processed.

  • variable (str) – (optional) The location in the dialog context where output is stored.

  • actions (List[DialogNodeAction]) – (optional) An array of objects describing any actions to be invoked by the dialog node.

  • digress_in (str) – (optional) Whether this top-level dialog node can be digressed into.

  • digress_out (str) – (optional) Whether this dialog node can be returned to after a digression.

  • digress_out_slots (str) – (optional) Whether the user can digress to top-level nodes while filling out slots.

  • user_label (str) – (optional) A label that can be displayed externally to describe the purpose of the node to users.

  • disambiguation_opt_out (bool) – (optional) Whether the dialog node should be excluded from disambiguation suggestions. Valid only when **type**=`standard` or frame.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_dialog_node(workspace_id: str, dialog_node: str, *, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get dialog node.

Get information about a dialog node.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • dialog_node (str) – The dialog node ID (for example, get_order).

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_dialog_node(workspace_id: str, dialog_node: str, *, new_dialog_node: str = None, new_description: str = None, new_conditions: str = None, new_parent: str = None, new_previous_sibling: str = None, new_output: Optional[ibm_watson.assistant_v1.DialogNodeOutput] = None, new_context: dict = None, new_metadata: dict = None, new_next_step: Optional[ibm_watson.assistant_v1.DialogNodeNextStep] = None, new_title: str = None, new_type: str = None, new_event_name: str = None, new_variable: str = None, new_actions: List[DialogNodeAction] = None, new_digress_in: str = None, new_digress_out: str = None, new_digress_out_slots: str = None, new_user_label: str = None, new_disambiguation_opt_out: bool = None, include_audit: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update dialog node.

Update an existing dialog node with new or modified data. If you want to update multiple dialog nodes with a single API call, consider using the [Update workspace](#update-workspace) method instead.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • dialog_node (str) – The dialog node ID (for example, get_order).

  • new_dialog_node (str) – (optional) The dialog node ID. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

  • new_description (str) – (optional) The description of the dialog node. This string cannot contain carriage return, newline, or tab characters.

  • new_conditions (str) – (optional) The condition that will trigger the dialog node. This string cannot contain carriage return, newline, or tab characters.

  • new_parent (str) – (optional) The ID of the parent dialog node. This property is omitted if the dialog node has no parent.

  • new_previous_sibling (str) – (optional) The ID of the previous sibling dialog node. This property is omitted if the dialog node has no previous sibling.

  • new_output (DialogNodeOutput) – (optional) The output of the dialog node. For more information about how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).

  • new_context (dict) – (optional) The context for the dialog node.

  • new_metadata (dict) – (optional) The metadata for the dialog node.

  • new_next_step (DialogNodeNextStep) – (optional) The next step to execute following this dialog node.

  • new_title (str) – (optional) The alias used to identify the dialog node. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

  • new_type (str) – (optional) How the dialog node is processed.

  • new_event_name (str) – (optional) How an event_handler node is processed.

  • new_variable (str) – (optional) The location in the dialog context where output is stored.

  • new_actions (List[DialogNodeAction]) – (optional) An array of objects describing any actions to be invoked by the dialog node.

  • new_digress_in (str) – (optional) Whether this top-level dialog node can be digressed into.

  • new_digress_out (str) – (optional) Whether this dialog node can be returned to after a digression.

  • new_digress_out_slots (str) – (optional) Whether the user can digress to top-level nodes while filling out slots.

  • new_user_label (str) – (optional) A label that can be displayed externally to describe the purpose of the node to users.

  • new_disambiguation_opt_out (bool) – (optional) Whether the dialog node should be excluded from disambiguation suggestions. Valid only when **type**=`standard` or frame.

  • include_audit (bool) – (optional) Whether to include the audit properties (created and updated timestamps) in the response.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_dialog_node(workspace_id: str, dialog_node: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete dialog node.

Delete a dialog node from a workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • dialog_node (str) – The dialog node ID (for example, get_order).

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_logs(workspace_id: str, *, sort: str = None, filter: str = None, page_limit: int = None, cursor: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List log events in a workspace.

List the events from the log of a specific workspace.

Parameters
  • workspace_id (str) – Unique identifier of the workspace.

  • sort (str) – (optional) How to sort the returned log events. You can sort by request_timestamp. To reverse the sort order, prefix the parameter value with a minus sign (-).

  • filter (str) – (optional) A cacheable parameter that limits the results to those matching the specified filter. For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_all_logs(filter: str, *, sort: str = None, page_limit: int = None, cursor: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List log events in all workspaces.

List the events from the logs of all workspaces in the service instance.

Parameters
  • filter (str) – A cacheable parameter that limits the results to those matching the specified filter. You must specify a filter query that includes a value for language, as well as a value for request.context.system.assistant_id, workspace_id, or request.context.metadata.deployment. For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).

  • sort (str) – (optional) How to sort the returned log events. You can sort by request_timestamp. To reverse the sort order, prefix the parameter value with a minus sign (-).

  • page_limit (int) – (optional) The number of records to return in each page of results.

  • cursor (str) – (optional) A token identifying the page of results to retrieve.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_user_data(customer_id: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete labeled data.

Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID. You associate a customer ID with data by passing the X-Watson-Metadata header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).

Parameters
  • customer_id (str) – The customer ID for which all data is to be deleted.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

class ListWorkspacesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned workspaces will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

NAME = 'name'
UPDATED = 'updated'
class GetWorkspaceEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

Indicates how the returned workspace data will be sorted. This parameter is valid only if **export**=`true`. Specify sort=stable to sort all workspace objects by unique identifier, in ascending alphabetical order.

STABLE = 'stable'
class ListIntentsEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned intents will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

INTENT = 'intent'
UPDATED = 'updated'
class ListExamplesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned examples will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

TEXT = 'text'
UPDATED = 'updated'
class ListCounterexamplesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned counterexamples will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

TEXT = 'text'
UPDATED = 'updated'
class ListEntitiesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned entities will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

ENTITY = 'entity'
UPDATED = 'updated'
class ListValuesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned entity values will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

VALUE = 'value'
UPDATED = 'updated'
class ListSynonymsEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned entity value synonyms will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

SYNONYM = 'synonym'
UPDATED = 'updated'
class ListDialogNodesEnums[source]

Bases: object

class Sort(value)[source]

Bases: enum.Enum

The attribute by which returned dialog nodes will be sorted. To reverse the sort order, prefix the value with a minus sign (-).

DIALOG_NODE = 'dialog_node'
UPDATED = 'updated'
class CaptureGroup(group: str, *, location: List[int] = None)[source]

Bases: object

A recognized capture group for a pattern-based entity.

Attr str group

A recognized capture group for the entity.

Attr List[int] location

(optional) Zero-based character offsets that indicate where the entity value begins and ends in the input text.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.CaptureGroup[source]

Initialize a CaptureGroup object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Context(*, conversation_id: str = None, system: Optional[ibm_watson.assistant_v1.SystemResponse] = None, metadata: Optional[ibm_watson.assistant_v1.MessageContextMetadata] = None, **kwargs)[source]

Bases: object

State information for the conversation. To maintain state, include the context from the previous response.

Attr str conversation_id

(optional) The unique identifier of the conversation.

Attr SystemResponse system

(optional) For internal use only.

Attr MessageContextMetadata metadata

(optional) Metadata related to the message.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Context[source]

Initialize a Context object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Counterexample(text: str, *, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

Counterexample.

Attr str text

The text of a user input marked as irrelevant input. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Counterexample[source]

Initialize a Counterexample object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class CounterexampleCollection(counterexamples: List[Counterexample], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

CounterexampleCollection.

Attr List[Counterexample] counterexamples

An array of objects describing the examples marked as irrelevant input.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.CounterexampleCollection[source]

Initialize a CounterexampleCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class CreateEntity(entity: str, *, description: str = None, metadata: dict = None, fuzzy_match: bool = None, created: datetime.datetime = None, updated: datetime.datetime = None, values: List[CreateValue] = None)[source]

Bases: object

CreateEntity.

Attr str entity

The name of the entity. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, and hyphen characters. - If you specify an entity name beginning with the reserved prefix sys-, it must be the name of a system entity that you want to enable. (Any entity content specified with the request is ignored.).

Attr str description

(optional) The description of the entity. This string cannot contain carriage return, newline, or tab characters.

Attr dict metadata

(optional) Any metadata related to the entity.

Attr bool fuzzy_match

(optional) Whether to use fuzzy matching for the entity.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

Attr List[CreateValue] values

(optional) An array of objects describing the entity values.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.CreateEntity[source]

Initialize a CreateEntity object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class CreateIntent(intent: str, *, description: str = None, created: datetime.datetime = None, updated: datetime.datetime = None, examples: List[Example] = None)[source]

Bases: object

CreateIntent.

Attr str intent

The name of the intent. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. - It cannot begin with the reserved prefix sys-.

Attr str description

(optional) The description of the intent. This string cannot contain carriage return, newline, or tab characters.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

Attr List[Example] examples

(optional) An array of user input examples for the intent.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.CreateIntent[source]

Initialize a CreateIntent object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class CreateValue(value: str, *, metadata: dict = None, type: str = None, synonyms: List[str] = None, patterns: List[str] = None, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

CreateValue.

Attr str value

The text of the entity value. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr dict metadata

(optional) Any metadata related to the entity value.

Attr str type

(optional) Specifies the type of entity value.

Attr List[str] synonyms

(optional) An array of synonyms for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A synonym must conform to the following resrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr List[str] patterns

(optional) An array of patterns for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A pattern is a regular expression; for more information about how to specify a pattern, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.CreateValue[source]

Initialize a CreateValue object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

Specifies the type of entity value.

SYNONYMS = 'synonyms'
PATTERNS = 'patterns'
class DialogNode(dialog_node: str, *, description: str = None, conditions: str = None, parent: str = None, previous_sibling: str = None, output: Optional[ibm_watson.assistant_v1.DialogNodeOutput] = None, context: dict = None, metadata: dict = None, next_step: Optional[ibm_watson.assistant_v1.DialogNodeNextStep] = None, title: str = None, type: str = None, event_name: str = None, variable: str = None, actions: List[DialogNodeAction] = None, digress_in: str = None, digress_out: str = None, digress_out_slots: str = None, user_label: str = None, disambiguation_opt_out: bool = None, disabled: bool = None, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

DialogNode.

Attr str dialog_node

The dialog node ID. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

Attr str description

(optional) The description of the dialog node. This string cannot contain carriage return, newline, or tab characters.

Attr str conditions

(optional) The condition that will trigger the dialog node. This string cannot contain carriage return, newline, or tab characters.

Attr str parent

(optional) The ID of the parent dialog node. This property is omitted if the dialog node has no parent.

Attr str previous_sibling

(optional) The ID of the previous sibling dialog node. This property is omitted if the dialog node has no previous sibling.

Attr DialogNodeOutput output

(optional) The output of the dialog node. For more information about how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).

Attr dict context

(optional) The context for the dialog node.

Attr dict metadata

(optional) The metadata for the dialog node.

Attr DialogNodeNextStep next_step

(optional) The next step to execute following this dialog node.

Attr str title

(optional) The alias used to identify the dialog node. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot characters.

Attr str type

(optional) How the dialog node is processed.

Attr str event_name

(optional) How an event_handler node is processed.

Attr str variable

(optional) The location in the dialog context where output is stored.

Attr List[DialogNodeAction] actions

(optional) An array of objects describing any actions to be invoked by the dialog node.

Attr str digress_in

(optional) Whether this top-level dialog node can be digressed into.

Attr str digress_out

(optional) Whether this dialog node can be returned to after a digression.

Attr str digress_out_slots

(optional) Whether the user can digress to top-level nodes while filling out slots.

Attr str user_label

(optional) A label that can be displayed externally to describe the purpose of the node to users.

Attr bool disambiguation_opt_out

(optional) Whether the dialog node should be excluded from disambiguation suggestions. Valid only when **type**=`standard` or frame.

Attr bool disabled

(optional) For internal use only.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNode[source]

Initialize a DialogNode object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

How the dialog node is processed.

STANDARD = 'standard'
EVENT_HANDLER = 'event_handler'
FRAME = 'frame'
SLOT = 'slot'
RESPONSE_CONDITION = 'response_condition'
FOLDER = 'folder'
class EventNameEnum(value)[source]

Bases: enum.Enum

How an event_handler node is processed.

FOCUS = 'focus'
INPUT = 'input'
FILLED = 'filled'
VALIDATE = 'validate'
FILLED_MULTIPLE = 'filled_multiple'
GENERIC = 'generic'
NOMATCH = 'nomatch'
NOMATCH_RESPONSES_DEPLETED = 'nomatch_responses_depleted'
DIGRESSION_RETURN_PROMPT = 'digression_return_prompt'
class DigressInEnum(value)[source]

Bases: enum.Enum

Whether this top-level dialog node can be digressed into.

NOT_AVAILABLE = 'not_available'
RETURNS = 'returns'
DOES_NOT_RETURN = 'does_not_return'
class DigressOutEnum(value)[source]

Bases: enum.Enum

Whether this dialog node can be returned to after a digression.

ALLOW_RETURNING = 'allow_returning'
ALLOW_ALL = 'allow_all'
ALLOW_ALL_NEVER_RETURN = 'allow_all_never_return'
class DigressOutSlotsEnum(value)[source]

Bases: enum.Enum

Whether the user can digress to top-level nodes while filling out slots.

NOT_ALLOWED = 'not_allowed'
ALLOW_RETURNING = 'allow_returning'
ALLOW_ALL = 'allow_all'
class DialogNodeAction(name: str, result_variable: str, *, type: str = None, parameters: dict = None, credentials: str = None)[source]

Bases: object

DialogNodeAction.

Attr str name

The name of the action.

Attr str type

(optional) The type of action to invoke.

Attr dict parameters

(optional) A map of key/value pairs to be provided to the action.

Attr str result_variable

The location in the dialog context where the result of the action is stored.

Attr str credentials

(optional) The name of the context variable that the client application will use to pass in credentials for the action.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeAction[source]

Initialize a DialogNodeAction object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

The type of action to invoke.

CLIENT = 'client'
SERVER = 'server'
CLOUD_FUNCTION = 'cloud_function'
WEB_ACTION = 'web_action'
WEBHOOK = 'webhook'
class DialogNodeCollection(dialog_nodes: List[DialogNode], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

An array of dialog nodes.

Attr List[DialogNode] dialog_nodes

An array of objects describing the dialog nodes defined for the workspace.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeCollection[source]

Initialize a DialogNodeCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeNextStep(behavior: str, *, dialog_node: str = None, selector: str = None)[source]

Bases: object

The next step to execute following this dialog node.

Attr str behavior

What happens after the dialog node completes. The valid values depend on the node type: - The following values are valid for any node:

  • get_user_input

  • skip_user_input

  • jump_to

  • If the node is of type event_handler and its parent node is of type slot

or frame, additional values are also valid:
  • if **event_name**=`filled` and the type of the parent node is slot: - reprompt - skip_all_slots

  • if **event_name**=`nomatch` and the type of the parent node is slot:
    • reprompt

    • skip_slot

    • skip_all_slots

  • if **event_name**=`generic` and the type of the parent node is frame:
    • reprompt

    • skip_slot

    • skip_all_slots

    If you specify jump_to, then you must also specify a value for the

dialog_node property.

Attr str dialog_node

(optional) The ID of the dialog node to process next. This parameter is required if **behavior**=`jump_to`.

Attr str selector

(optional) Which part of the dialog node to process next.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeNextStep[source]

Initialize a DialogNodeNextStep object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class BehaviorEnum(value)[source]

Bases: enum.Enum

What happens after the dialog node completes. The valid values depend on the node type: - The following values are valid for any node:

  • get_user_input

  • skip_user_input

  • jump_to

  • If the node is of type event_handler and its parent node is of type slot or

frame, additional values are also valid:
  • if **event_name**=`filled` and the type of the parent node is slot: - reprompt - skip_all_slots

  • if **event_name**=`nomatch` and the type of the parent node is slot:
    • reprompt

    • skip_slot

    • skip_all_slots

  • if **event_name**=`generic` and the type of the parent node is frame:
    • reprompt

    • skip_slot

    • skip_all_slots

    If you specify jump_to, then you must also specify a value for the

dialog_node property.

GET_USER_INPUT = 'get_user_input'
SKIP_USER_INPUT = 'skip_user_input'
JUMP_TO = 'jump_to'
REPROMPT = 'reprompt'
SKIP_SLOT = 'skip_slot'
SKIP_ALL_SLOTS = 'skip_all_slots'
class SelectorEnum(value)[source]

Bases: enum.Enum

Which part of the dialog node to process next.

CONDITION = 'condition'
CLIENT = 'client'
USER_INPUT = 'user_input'
BODY = 'body'
class DialogNodeOutput(*, generic: List[DialogNodeOutputGeneric] = None, modifiers: Optional[ibm_watson.assistant_v1.DialogNodeOutputModifiers] = None, **kwargs)[source]

Bases: object

The output of the dialog node. For more information about how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).

Attr List[DialogNodeOutputGeneric] generic

(optional) An array of objects describing the output defined for the dialog node.

Attr DialogNodeOutputModifiers modifiers

(optional) Options that modify how specified output is handled.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutput[source]

Initialize a DialogNodeOutput object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeOutputGeneric(response_type: str, *, values: List[DialogNodeOutputTextValuesElement] = None, selection_policy: str = None, delimiter: str = None, time: int = None, typing: bool = None, source: str = None, title: str = None, description: str = None, preference: str = None, options: List[DialogNodeOutputOptionsElement] = None, message_to_human_agent: str = None, query: str = None, query_type: str = None, filter: str = None, discovery_version: str = None)[source]

Bases: object

DialogNodeOutputGeneric.

Attr str response_type

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel. Note: The search_skill response type is used only by the v2 runtime API.

Attr List[DialogNodeOutputTextValuesElement] values

(optional) A list of one or more objects defining text responses. Required when **response_type**=`text`.

Attr str selection_policy

(optional) How a response is selected from the list, if more than one response is specified. Valid only when **response_type**=`text`.

Attr str delimiter

(optional) The delimiter to use as a separator between responses when selection_policy`=`multiline.

Attr int time

(optional) How long to pause, in milliseconds. The valid values are from 0 to 10000. Valid only when **response_type**=`pause`.

Attr bool typing

(optional) Whether to send a “user is typing” event during the pause. Ignored if the channel does not support this event. Valid only when **response_type**=`pause`.

Attr str source

(optional) The URL of the image. Required when **response_type**=`image`.

Attr str title

(optional) An optional title to show before the response. Valid only when **response_type**=`image` or option.

Attr str description

(optional) An optional description to show with the response. Valid only when **response_type**=`image` or option.

Attr str preference

(optional) The preferred type of control to display, if supported by the channel. Valid only when **response_type**=`option`.

Attr List[DialogNodeOutputOptionsElement] options

(optional) An array of objects describing the options from which the user can choose. You can include up to 20 options. Required when **response_type**=`option`.

Attr str message_to_human_agent

(optional) An optional message to be sent to the human agent who will be taking over the conversation. Valid only when **reponse_type**=`connect_to_agent`.

Attr str query

(optional) The text of the search query. This can be either a natural-language query or a query that uses the Discovery query language syntax, depending on the value of the query_type property. For more information, see the [Discovery service documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-operators#query-operators). Required when **response_type**=`search_skill`.

Attr str query_type

(optional) The type of the search query. Required when **response_type**=`search_skill`.

Attr str filter

(optional) An optional filter that narrows the set of documents to be searched. For more information, see the [Discovery service documentation]([Discovery service documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-parameters#filter).

Attr str discovery_version

(optional) The version of the Discovery service API to use for the query.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutputGeneric[source]

Initialize a DialogNodeOutputGeneric object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ResponseTypeEnum(value)[source]

Bases: enum.Enum

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel. Note: The search_skill response type is used only by the v2 runtime API.

TEXT = 'text'
PAUSE = 'pause'
IMAGE = 'image'
OPTION = 'option'
CONNECT_TO_AGENT = 'connect_to_agent'
SEARCH_SKILL = 'search_skill'
class SelectionPolicyEnum(value)[source]

Bases: enum.Enum

How a response is selected from the list, if more than one response is specified. Valid only when **response_type**=`text`.

SEQUENTIAL = 'sequential'
RANDOM = 'random'
MULTILINE = 'multiline'
class PreferenceEnum(value)[source]

Bases: enum.Enum

The preferred type of control to display, if supported by the channel. Valid only when **response_type**=`option`.

DROPDOWN = 'dropdown'
BUTTON = 'button'
class QueryTypeEnum(value)[source]

Bases: enum.Enum

The type of the search query. Required when **response_type**=`search_skill`.

NATURAL_LANGUAGE = 'natural_language'
DISCOVERY_QUERY_LANGUAGE = 'discovery_query_language'
class DialogNodeOutputModifiers(*, overwrite: bool = None)[source]

Bases: object

Options that modify how specified output is handled.

Attr bool overwrite

(optional) Whether values in the output will overwrite output values in an array specified by previously executed dialog nodes. If this option is set to false, new values will be appended to previously specified values.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutputModifiers[source]

Initialize a DialogNodeOutputModifiers object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeOutputOptionsElement(label: str, value: ibm_watson.assistant_v1.DialogNodeOutputOptionsElementValue)[source]

Bases: object

DialogNodeOutputOptionsElement.

Attr str label

The user-facing label for the option.

Attr DialogNodeOutputOptionsElementValue value

An object defining the message input to be sent to the Watson Assistant service if the user selects the corresponding option.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutputOptionsElement[source]

Initialize a DialogNodeOutputOptionsElement object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeOutputOptionsElementValue(*, input: Optional[ibm_watson.assistant_v1.MessageInput] = None, intents: List[RuntimeIntent] = None, entities: List[RuntimeEntity] = None)[source]

Bases: object

An object defining the message input to be sent to the Watson Assistant service if the user selects the corresponding option.

Attr MessageInput input

(optional) An input object that includes the input text.

Attr List[RuntimeIntent] intents

(optional) An array of intents to be used while processing the input. Note: This property is supported for backward compatibility with applications that use the v1 Get response to user input method.

Attr List[RuntimeEntity] entities

(optional) An array of entities to be used while processing the user input. Note: This property is supported for backward compatibility with applications that use the v1 Get response to user input method.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutputOptionsElementValue[source]

Initialize a DialogNodeOutputOptionsElementValue object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeOutputTextValuesElement(*, text: str = None)[source]

Bases: object

DialogNodeOutputTextValuesElement.

attr str text

(optional) The text of a response. This string can include newline characters (`

`), Markdown tagging, or other special characters, if

supported by the channel.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeOutputTextValuesElement[source]

Initialize a DialogNodeOutputTextValuesElement object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogNodeVisitedDetails(*, dialog_node: str = None, title: str = None, conditions: str = None)[source]

Bases: object

DialogNodeVisitedDetails.

Attr str dialog_node

(optional) A dialog node that was triggered during processing of the input message.

Attr str title

(optional) The title of the dialog node.

Attr str conditions

(optional) The conditions that trigger the dialog node.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogNodeVisitedDetails[source]

Initialize a DialogNodeVisitedDetails object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogSuggestion(label: str, value: ibm_watson.assistant_v1.DialogSuggestionValue, *, output: Optional[ibm_watson.assistant_v1.DialogSuggestionOutput] = None, dialog_node: str = None)[source]

Bases: object

DialogSuggestion.

Attr str label

The user-facing label for the disambiguation option. This label is taken from the title or user_label property of the corresponding dialog node, depending on the disambiguation options.

Attr DialogSuggestionValue value

An object defining the message input, intents, and entities to be sent to the Watson Assistant service if the user selects the corresponding disambiguation option.

Attr DialogSuggestionOutput output

(optional) The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding option.

Attr str dialog_node

(optional) The ID of the dialog node that the label property is taken from. The label property is populated using the value of the dialog node’s user_label property.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogSuggestion[source]

Initialize a DialogSuggestion object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogSuggestionOutput(text: List[str], *, nodes_visited: List[str] = None, nodes_visited_details: List[DialogNodeVisitedDetails] = None, generic: List[DialogSuggestionResponseGeneric] = None, **kwargs)[source]

Bases: object

The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding option.

Attr List[str] nodes_visited

(optional) An array of the nodes that were triggered to create the response, in the order in which they were visited. This information is useful for debugging and for tracing the path taken through the node tree.

Attr List[DialogNodeVisitedDetails] nodes_visited_details

(optional) An array of objects containing detailed diagnostic information about the nodes that were triggered during processing of the input message. Included only if nodes_visited_details is set to true in the message request.

Attr List[str] text

An array of responses to the user.

Attr List[DialogSuggestionResponseGeneric] generic

(optional) Output intended for any channel. It is the responsibility of the client application to implement the supported response types.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogSuggestionOutput[source]

Initialize a DialogSuggestionOutput object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DialogSuggestionResponseGeneric(response_type: str, *, text: str = None, time: int = None, typing: bool = None, source: str = None, title: str = None, description: str = None, preference: str = None, options: List[DialogNodeOutputOptionsElement] = None, message_to_human_agent: str = None, topic: str = None, dialog_node: str = None)[source]

Bases: object

DialogSuggestionResponseGeneric.

Attr str response_type

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel. Note: The search_skill response type is is used only by the v2 runtime API.

Attr str text

(optional) The text of the response.

Attr int time

(optional) How long to pause, in milliseconds.

Attr bool typing

(optional) Whether to send a “user is typing” event during the pause.

Attr str source

(optional) The URL of the image.

Attr str title

(optional) The title or introductory text to show before the response.

Attr str description

(optional) The description to show with the the response.

Attr str preference

(optional) The preferred type of control to display.

Attr List[DialogNodeOutputOptionsElement] options

(optional) An array of objects describing the options from which the user can choose.

Attr str message_to_human_agent

(optional) A message to be sent to the human agent who will be taking over the conversation.

Attr str topic

(optional) A label identifying the topic of the conversation, derived from the title property of the relevant node.

Attr str dialog_node

(optional) The ID of the dialog node that the topic property is taken from. The topic property is populated using the value of the dialog node’s title property.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogSuggestionResponseGeneric[source]

Initialize a DialogSuggestionResponseGeneric object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ResponseTypeEnum(value)[source]

Bases: enum.Enum

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel. Note: The search_skill response type is is used only by the v2 runtime API.

TEXT = 'text'
PAUSE = 'pause'
IMAGE = 'image'
OPTION = 'option'
CONNECT_TO_AGENT = 'connect_to_agent'
SEARCH_SKILL = 'search_skill'
class PreferenceEnum(value)[source]

Bases: enum.Enum

The preferred type of control to display.

DROPDOWN = 'dropdown'
BUTTON = 'button'
class DialogSuggestionValue(*, input: Optional[ibm_watson.assistant_v1.MessageInput] = None, intents: List[RuntimeIntent] = None, entities: List[RuntimeEntity] = None)[source]

Bases: object

An object defining the message input, intents, and entities to be sent to the Watson Assistant service if the user selects the corresponding disambiguation option.

Attr MessageInput input

(optional) An input object that includes the input text.

Attr List[RuntimeIntent] intents

(optional) An array of intents to be sent along with the user input.

Attr List[RuntimeEntity] entities

(optional) An array of entities to be sent along with the user input.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.DialogSuggestionValue[source]

Initialize a DialogSuggestionValue object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Entity(entity: str, *, description: str = None, metadata: dict = None, fuzzy_match: bool = None, created: datetime.datetime = None, updated: datetime.datetime = None, values: List[Value] = None)[source]

Bases: object

Entity.

Attr str entity

The name of the entity. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, and hyphen characters. - If you specify an entity name beginning with the reserved prefix sys-, it must be the name of a system entity that you want to enable. (Any entity content specified with the request is ignored.).

Attr str description

(optional) The description of the entity. This string cannot contain carriage return, newline, or tab characters.

Attr dict metadata

(optional) Any metadata related to the entity.

Attr bool fuzzy_match

(optional) Whether to use fuzzy matching for the entity.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

Attr List[Value] values

(optional) An array of objects describing the entity values.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Entity[source]

Initialize a Entity object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class EntityCollection(entities: List[Entity], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

An array of objects describing the entities for the workspace.

Attr List[Entity] entities

An array of objects describing the entities defined for the workspace.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.EntityCollection[source]

Initialize a EntityCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class EntityMention(text: str, intent: str, location: List[int])[source]

Bases: object

An object describing a contextual entity mention.

Attr str text

The text of the user input example.

Attr str intent

The name of the intent.

Attr List[int] location

An array of zero-based character offsets that indicate where the entity mentions begin and end in the input text.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.EntityMention[source]

Initialize a EntityMention object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class EntityMentionCollection(examples: List[EntityMention], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

EntityMentionCollection.

Attr List[EntityMention] examples

An array of objects describing the entity mentions defined for an entity.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.EntityMentionCollection[source]

Initialize a EntityMentionCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Example(text: str, *, mentions: List[Mention] = None, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

Example.

Attr str text

The text of a user input example. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr List[Mention] mentions

(optional) An array of contextual entity mentions.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Example[source]

Initialize a Example object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ExampleCollection(examples: List[Example], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

ExampleCollection.

Attr List[Example] examples

An array of objects describing the examples defined for the intent.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.ExampleCollection[source]

Initialize a ExampleCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Intent(intent: str, *, description: str = None, created: datetime.datetime = None, updated: datetime.datetime = None, examples: List[Example] = None)[source]

Bases: object

Intent.

Attr str intent

The name of the intent. This string must conform to the following restrictions: - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. - It cannot begin with the reserved prefix sys-.

Attr str description

(optional) The description of the intent. This string cannot contain carriage return, newline, or tab characters.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

Attr List[Example] examples

(optional) An array of user input examples for the intent.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Intent[source]

Initialize a Intent object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class IntentCollection(intents: List[Intent], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

IntentCollection.

Attr List[Intent] intents

An array of objects describing the intents defined for the workspace.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.IntentCollection[source]

Initialize a IntentCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Log(request: ibm_watson.assistant_v1.MessageRequest, response: ibm_watson.assistant_v1.MessageResponse, log_id: str, request_timestamp: str, response_timestamp: str, workspace_id: str, language: str)[source]

Bases: object

Log.

Attr MessageRequest request

A request sent to the workspace, including the user input and context.

Attr MessageResponse response

The response sent by the workspace, including the output text, detected intents and entities, and context.

Attr str log_id

A unique identifier for the logged event.

Attr str request_timestamp

The timestamp for receipt of the message.

Attr str response_timestamp

The timestamp for the system response to the message.

Attr str workspace_id

The unique identifier of the workspace where the request was made.

Attr str language

The language of the workspace where the message request was made.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Log[source]

Initialize a Log object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LogCollection(logs: List[Log], pagination: ibm_watson.assistant_v1.LogPagination)[source]

Bases: object

LogCollection.

Attr List[Log] logs

An array of objects describing log events.

Attr LogPagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.LogCollection[source]

Initialize a LogCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LogMessage(level: str, msg: str)[source]

Bases: object

Log message details.

Attr str level

The severity of the log message.

Attr str msg

The text of the log message.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.LogMessage[source]

Initialize a LogMessage object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LevelEnum(value)[source]

Bases: enum.Enum

The severity of the log message.

INFO = 'info'
ERROR = 'error'
WARN = 'warn'
class LogPagination(*, next_url: str = None, matched: int = None, next_cursor: str = None)[source]

Bases: object

The pagination data for the returned objects.

Attr str next_url

(optional) The URL that will return the next page of results, if any.

Attr int matched

(optional) Reserved for future use.

Attr str next_cursor

(optional) A token identifying the next page of results.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.LogPagination[source]

Initialize a LogPagination object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Mention(entity: str, location: List[int])[source]

Bases: object

A mention of a contextual entity.

Attr str entity

The name of the entity.

Attr List[int] location

An array of zero-based character offsets that indicate where the entity mentions begin and end in the input text.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Mention[source]

Initialize a Mention object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class MessageContextMetadata(*, deployment: str = None, user_id: str = None)[source]

Bases: object

Metadata related to the message.

Attr str deployment

(optional) A label identifying the deployment environment, used for filtering log data. This string cannot contain carriage return, newline, or tab characters.

Attr str user_id

(optional) A string value that identifies the user who is interacting with the workspace. The client must provide a unique identifier for each individual end user who accesses the application. For Plus and Premium plans, this user ID is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.MessageContextMetadata[source]

Initialize a MessageContextMetadata object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class MessageInput(*, text: str = None, spelling_suggestions: bool = None, spelling_auto_correct: bool = None, suggested_text: str = None, original_text: str = None, **kwargs)[source]

Bases: object

An input object that includes the input text.

Attr str text

(optional) The text of the user input. This string cannot contain carriage return, newline, or tab characters.

Attr bool spelling_suggestions

(optional) Whether to use spelling correction when processing the input. This property overrides the value of the spelling_suggestions property in the workspace settings.

Attr bool spelling_auto_correct

(optional) Whether to use autocorrection when processing the input. If spelling correction is used and this property is false, any suggested corrections are returned in the suggested_text property of the message response. If this property is true, any corrections are automatically applied to the user input, and the original text is returned in the original_text property of the message response. This property overrides the value of the spelling_auto_correct property in the workspace settings.

Attr str suggested_text

(optional) Any suggested corrections of the input text. This property is returned only if spelling correction is enabled and autocorrection is disabled.

Attr str original_text

(optional) The original user input text. This property is returned only if autocorrection is enabled and the user input was corrected.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.MessageInput[source]

Initialize a MessageInput object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class MessageRequest(*, input: Optional[ibm_watson.assistant_v1.MessageInput] = None, intents: List[RuntimeIntent] = None, entities: List[RuntimeEntity] = None, alternate_intents: bool = None, context: Optional[ibm_watson.assistant_v1.Context] = None, output: Optional[ibm_watson.assistant_v1.OutputData] = None, actions: List[DialogNodeAction] = None)[source]

Bases: object

A request sent to the workspace, including the user input and context.

Attr MessageInput input

(optional) An input object that includes the input text.

Attr List[RuntimeIntent] intents

(optional) Intents to use when evaluating the user input. Include intents from the previous response to continue using those intents rather than trying to recognize intents in the new input.

Attr List[RuntimeEntity] entities

(optional) Entities to use when evaluating the message. Include entities from the previous response to continue using those entities rather than detecting entities in the new input.

Attr bool alternate_intents

(optional) Whether to return more than one intent. A value of true indicates that all matching intents are returned.

Attr Context context

(optional) State information for the conversation. To maintain state, include the context from the previous response.

Attr OutputData output

(optional) An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log.

Attr List[DialogNodeAction] actions

(optional) An array of objects describing any actions requested by the dialog node.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.MessageRequest[source]

Initialize a MessageRequest object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class MessageResponse(input: ibm_watson.assistant_v1.MessageInput, intents: List[RuntimeIntent], entities: List[RuntimeEntity], context: ibm_watson.assistant_v1.Context, output: ibm_watson.assistant_v1.OutputData, *, alternate_intents: bool = None, actions: List[DialogNodeAction] = None)[source]

Bases: object

The response sent by the workspace, including the output text, detected intents and entities, and context.

Attr MessageInput input

An input object that includes the input text.

Attr List[RuntimeIntent] intents

An array of intents recognized in the user input, sorted in descending order of confidence.

Attr List[RuntimeEntity] entities

An array of entities identified in the user input.

Attr bool alternate_intents

(optional) Whether to return more than one intent. A value of true indicates that all matching intents are returned.

Attr Context context

State information for the conversation. To maintain state, include the context from the previous response.

Attr OutputData output

An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log.

Attr List[DialogNodeAction] actions

(optional) An array of objects describing any actions requested by the dialog node.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.MessageResponse[source]

Initialize a MessageResponse object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class OutputData(log_messages: List[LogMessage], text: List[str], *, nodes_visited: List[str] = None, nodes_visited_details: List[DialogNodeVisitedDetails] = None, generic: List[RuntimeResponseGeneric] = None, **kwargs)[source]

Bases: object

An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log.

Attr List[str] nodes_visited

(optional) An array of the nodes that were triggered to create the response, in the order in which they were visited. This information is useful for debugging and for tracing the path taken through the node tree.

Attr List[DialogNodeVisitedDetails] nodes_visited_details

(optional) An array of objects containing detailed diagnostic information about the nodes that were triggered during processing of the input message. Included only if nodes_visited_details is set to true in the message request.

Attr List[LogMessage] log_messages

An array of up to 50 messages logged with the request.

Attr List[str] text

An array of responses to the user.

Attr List[RuntimeResponseGeneric] generic

(optional) Output intended for any channel. It is the responsibility of the client application to implement the supported response types.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.OutputData[source]

Initialize a OutputData object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Pagination(refresh_url: str, *, next_url: str = None, total: int = None, matched: int = None, refresh_cursor: str = None, next_cursor: str = None)[source]

Bases: object

The pagination data for the returned objects.

Attr str refresh_url

The URL that will return the same page of results.

Attr str next_url

(optional) The URL that will return the next page of results.

Attr int total

(optional) Reserved for future use.

Attr int matched

(optional) Reserved for future use.

Attr str refresh_cursor

(optional) A token identifying the current page of results.

Attr str next_cursor

(optional) A token identifying the next page of results.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Pagination[source]

Initialize a Pagination object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class RuntimeEntity(entity: str, location: List[int], value: str, *, confidence: float = None, metadata: dict = None, groups: List[CaptureGroup] = None, interpretation: Optional[ibm_watson.assistant_v1.RuntimeEntityInterpretation] = None, alternatives: List[RuntimeEntityAlternative] = None, role: Optional[ibm_watson.assistant_v1.RuntimeEntityRole] = None)[source]

Bases: object

A term from the request that was identified as an entity.

Attr str entity

An entity detected in the input.

Attr List[int] location

An array of zero-based character offsets that indicate where the detected entity values begin and end in the input text.

Attr str value

The entity value that was recognized in the user input.

Attr float confidence

(optional) A decimal percentage that represents Watson’s confidence in the recognized entity.

Attr dict metadata

(optional) Any metadata for the entity.

Attr List[CaptureGroup] groups

(optional) The recognized capture groups for the entity, as defined by the entity pattern.

Attr RuntimeEntityInterpretation interpretation

(optional) An object containing detailed information about the entity recognized in the user input. This property is included only if the new system entities are enabled for the workspace. For more information about how the new system entities are interpreted, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-system-entities).

Attr List[RuntimeEntityAlternative] alternatives

(optional) An array of possible alternative values that the user might have intended instead of the value returned in the value property. This property is returned only for @sys-time and @sys-date entities when the user’s input is ambiguous. This property is included only if the new system entities are enabled for the workspace.

Attr RuntimeEntityRole role

(optional) An object describing the role played by a system entity that is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the workspace.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeEntity[source]

Initialize a RuntimeEntity object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class RuntimeEntityAlternative(*, value: str = None, confidence: float = None)[source]

Bases: object

An alternative value for the recognized entity.

Attr str value

(optional) The entity value that was recognized in the user input.

Attr float confidence

(optional) A decimal percentage that represents Watson’s confidence in the recognized entity.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeEntityAlternative[source]

Initialize a RuntimeEntityAlternative object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class RuntimeEntityInterpretation(*, calendar_type: str = None, datetime_link: str = None, festival: str = None, granularity: str = None, range_link: str = None, range_modifier: str = None, relative_day: float = None, relative_month: float = None, relative_week: float = None, relative_weekend: float = None, relative_year: float = None, specific_day: float = None, specific_day_of_week: str = None, specific_month: float = None, specific_quarter: float = None, specific_year: float = None, numeric_value: float = None, subtype: str = None, part_of_day: str = None, relative_hour: float = None, relative_minute: float = None, relative_second: float = None, specific_hour: float = None, specific_minute: float = None, specific_second: float = None, timezone: str = None)[source]

Bases: object

RuntimeEntityInterpretation.

Attr str calendar_type

(optional) The calendar used to represent a recognized date (for example, Gregorian).

Attr str datetime_link

(optional) A unique identifier used to associate a recognized time and date. If the user input contains a date and time that are mentioned together (for example, Today at 5, the same datetime_link value is returned for both the @sys-date and @sys-time entities).

Attr str festival

(optional) A locale-specific holiday name (such as thanksgiving or christmas). This property is included when a @sys-date entity is recognized based on a holiday name in the user input.

Attr str granularity

(optional) The precision or duration of a time range specified by a recognized @sys-time or @sys-date entity.

Attr str range_link

(optional) A unique identifier used to associate multiple recognized @sys-date, @sys-time, or @sys-number entities that are recognized as a range of values in the user’s input (for example, from July 4 until July 14 or from 20 to 25).

Attr str range_modifier

(optional) The word in the user input that indicates that a sys-date or sys-time entity is part of an implied range where only one date or time is specified (for example, since or until).

Attr float relative_day

(optional) A recognized mention of a relative day, represented numerically as an offset from the current date (for example, -1 for yesterday or 10 for in ten days).

Attr float relative_month

(optional) A recognized mention of a relative month, represented numerically as an offset from the current month (for example, 1 for next month or -3 for three months ago).

Attr float relative_week

(optional) A recognized mention of a relative week, represented numerically as an offset from the current week (for example, 2 for in two weeks or -1 for `last week).

Attr float relative_weekend

(optional) A recognized mention of a relative date range for a weekend, represented numerically as an offset from the current weekend (for example, 0 for this weekend or -1 for last weekend).

Attr float relative_year

(optional) A recognized mention of a relative year, represented numerically as an offset from the current year (for example, 1 for next year or -5 for five years ago).

Attr float specific_day

(optional) A recognized mention of a specific date, represented numerically as the date within the month (for example, 30 for June 30.).

Attr str specific_day_of_week

(optional) A recognized mention of a specific day of the week as a lowercase string (for example, monday).

Attr float specific_month

(optional) A recognized mention of a specific month, represented numerically (for example, 7 for July).

Attr float specific_quarter

(optional) A recognized mention of a specific quarter, represented numerically (for example, 3 for the third quarter).

Attr float specific_year

(optional) A recognized mention of a specific year (for example, 2016).

Attr float numeric_value

(optional) A recognized numeric value, represented as an integer or double.

Attr str subtype

(optional) The type of numeric value recognized in the user input (integer or rational).

Attr str part_of_day

(optional) A recognized term for a time that was mentioned as a part of the day in the user’s input (for example, morning or afternoon).

Attr float relative_hour

(optional) A recognized mention of a relative hour, represented numerically as an offset from the current hour (for example, 3 for in three hours or -1 for an hour ago).

Attr float relative_minute

(optional) A recognized mention of a relative time, represented numerically as an offset in minutes from the current time (for example, 5 for in five minutes or -15 for fifteen minutes ago).

Attr float relative_second

(optional) A recognized mention of a relative time, represented numerically as an offset in seconds from the current time (for example, 10 for in ten seconds or -30 for thirty seconds ago).

Attr float specific_hour

(optional) A recognized specific hour mentioned as part of a time value (for example, 10 for 10:15 AM.).

Attr float specific_minute

(optional) A recognized specific minute mentioned as part of a time value (for example, 15 for 10:15 AM.).

Attr float specific_second

(optional) A recognized specific second mentioned as part of a time value (for example, 30 for 10:15:30 AM.).

Attr str timezone

(optional) A recognized time zone mentioned as part of a time value (for example, EST).

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeEntityInterpretation[source]

Initialize a RuntimeEntityInterpretation object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class GranularityEnum(value)[source]

Bases: enum.Enum

The precision or duration of a time range specified by a recognized @sys-time or @sys-date entity.

DAY = 'day'
FORTNIGHT = 'fortnight'
HOUR = 'hour'
INSTANT = 'instant'
MINUTE = 'minute'
MONTH = 'month'
QUARTER = 'quarter'
SECOND = 'second'
WEEK = 'week'
WEEKEND = 'weekend'
YEAR = 'year'
class RuntimeEntityRole(*, type: str = None)[source]

Bases: object

An object describing the role played by a system entity that is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the workspace.

Attr str type

(optional) The relationship of the entity to the range.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeEntityRole[source]

Initialize a RuntimeEntityRole object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

The relationship of the entity to the range.

DATE_FROM = 'date_from'
DATE_TO = 'date_to'
NUMBER_FROM = 'number_from'
NUMBER_TO = 'number_to'
TIME_FROM = 'time_from'
TIME_TO = 'time_to'
class RuntimeIntent(intent: str, confidence: float)[source]

Bases: object

An intent identified in the user input.

Attr str intent

The name of the recognized intent.

Attr float confidence

A decimal percentage that represents Watson’s confidence in the intent.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeIntent[source]

Initialize a RuntimeIntent object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class RuntimeResponseGeneric(response_type: str, *, text: str = None, time: int = None, typing: bool = None, source: str = None, title: str = None, description: str = None, preference: str = None, options: List[DialogNodeOutputOptionsElement] = None, message_to_human_agent: str = None, topic: str = None, dialog_node: str = None, suggestions: List[DialogSuggestion] = None)[source]

Bases: object

RuntimeResponseGeneric.

Attr str response_type

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel.

Attr str text

(optional) The text of the response.

Attr int time

(optional) How long to pause, in milliseconds.

Attr bool typing

(optional) Whether to send a “user is typing” event during the pause.

Attr str source

(optional) The URL of the image.

Attr str title

(optional) The title or introductory text to show before the response.

Attr str description

(optional) The description to show with the the response.

Attr str preference

(optional) The preferred type of control to display.

Attr List[DialogNodeOutputOptionsElement] options

(optional) An array of objects describing the options from which the user can choose.

Attr str message_to_human_agent

(optional) A message to be sent to the human agent who will be taking over the conversation.

Attr str topic

(optional) A label identifying the topic of the conversation, derived from the title property of the relevant node.

Attr str dialog_node

(optional) The ID of the dialog node that the topic property is taken from. The topic property is populated using the value of the dialog node’s title property.

Attr List[DialogSuggestion] suggestions

(optional) An array of objects describing the possible matching dialog nodes from which the user can choose.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.RuntimeResponseGeneric[source]

Initialize a RuntimeResponseGeneric object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ResponseTypeEnum(value)[source]

Bases: enum.Enum

The type of response returned by the dialog node. The specified response type must be supported by the client application or channel.

TEXT = 'text'
PAUSE = 'pause'
IMAGE = 'image'
OPTION = 'option'
CONNECT_TO_AGENT = 'connect_to_agent'
SUGGESTION = 'suggestion'
class PreferenceEnum(value)[source]

Bases: enum.Enum

The preferred type of control to display.

DROPDOWN = 'dropdown'
BUTTON = 'button'
class Synonym(synonym: str, *, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

Synonym.

Attr str synonym

The text of the synonym. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Synonym[source]

Initialize a Synonym object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class SynonymCollection(synonyms: List[Synonym], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

SynonymCollection.

Attr List[Synonym] synonyms

An array of synonyms.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.SynonymCollection[source]

Initialize a SynonymCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class SystemResponse(**kwargs)[source]

Bases: object

For internal use only.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.SystemResponse[source]

Initialize a SystemResponse object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Value(value: str, type: str, *, metadata: dict = None, synonyms: List[str] = None, patterns: List[str] = None, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

Value.

Attr str value

The text of the entity value. This string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr dict metadata

(optional) Any metadata related to the entity value.

Attr str type

Specifies the type of entity value.

Attr List[str] synonyms

(optional) An array of synonyms for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A synonym must conform to the following resrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters.

Attr List[str] patterns

(optional) An array of patterns for the entity value. A value can specify either synonyms or patterns (depending on the value type), but not both. A pattern is a regular expression; for more information about how to specify a pattern, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Value[source]

Initialize a Value object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

Specifies the type of entity value.

SYNONYMS = 'synonyms'
PATTERNS = 'patterns'
class ValueCollection(values: List[Value], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

ValueCollection.

Attr List[Value] values

An array of entity values.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.ValueCollection[source]

Initialize a ValueCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Webhook(url: str, name: str, *, headers: List[WebhookHeader] = None)[source]

Bases: object

A webhook that can be used by dialog nodes to make programmatic calls to an external function. Note: Currently, only a single webhook named main_webhook is supported.

Attr str url

The URL for the external service or application to which you want to send HTTP POST requests.

Attr str name

The name of the webhook. Currently, main_webhook is the only supported value.

Attr List[WebhookHeader] headers

(optional) An optional array of HTTP headers to pass with the HTTP request.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Webhook[source]

Initialize a Webhook object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class WebhookHeader(name: str, value: str)[source]

Bases: object

A key/value pair defining an HTTP header and a value.

Attr str name

The name of an HTTP header (for example, Authorization).

Attr str value

The value of an HTTP header.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WebhookHeader[source]

Initialize a WebhookHeader object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Workspace(name: str, language: str, learning_opt_out: bool, workspace_id: str, *, description: str = None, metadata: dict = None, system_settings: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettings] = None, status: str = None, created: datetime.datetime = None, updated: datetime.datetime = None, intents: List[Intent] = None, entities: List[Entity] = None, dialog_nodes: List[DialogNode] = None, counterexamples: List[Counterexample] = None, webhooks: List[Webhook] = None)[source]

Bases: object

Workspace.

Attr str name

The name of the workspace. This string cannot contain carriage return, newline, or tab characters.

Attr str description

(optional) The description of the workspace. This string cannot contain carriage return, newline, or tab characters.

Attr str language

The language of the workspace.

Attr dict metadata

(optional) Any metadata related to the workspace.

Attr bool learning_opt_out

Whether training data from the workspace (including artifacts such as intents and entities) can be used by IBM for general service improvements. true indicates that workspace training data is not to be used.

Attr WorkspaceSystemSettings system_settings

(optional) Global settings for the workspace.

Attr str workspace_id

The workspace ID of the workspace.

Attr str status

(optional) The current status of the workspace.

Attr datetime created

(optional) The timestamp for creation of the object.

Attr datetime updated

(optional) The timestamp for the most recent update to the object.

Attr List[Intent] intents

(optional) An array of intents.

Attr List[Entity] entities

(optional) An array of objects describing the entities for the workspace.

Attr List[DialogNode] dialog_nodes

(optional) An array of objects describing the dialog nodes in the workspace.

Attr List[Counterexample] counterexamples

(optional) An array of counterexamples.

Attr List[Webhook] webhooks

(optional)

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.Workspace[source]

Initialize a Workspace object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class StatusEnum(value)[source]

Bases: enum.Enum

The current status of the workspace.

NON_EXISTENT = 'Non Existent'
TRAINING = 'Training'
FAILED = 'Failed'
AVAILABLE = 'Available'
UNAVAILABLE = 'Unavailable'
class WorkspaceCollection(workspaces: List[Workspace], pagination: ibm_watson.assistant_v1.Pagination)[source]

Bases: object

WorkspaceCollection.

Attr List[Workspace] workspaces

An array of objects describing the workspaces associated with the service instance.

Attr Pagination pagination

The pagination data for the returned objects.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceCollection[source]

Initialize a WorkspaceCollection object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class WorkspaceSystemSettings(*, tooling: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettingsTooling] = None, disambiguation: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettingsDisambiguation] = None, human_agent_assist: dict = None, spelling_suggestions: bool = None, spelling_auto_correct: bool = None, system_entities: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettingsSystemEntities] = None, off_topic: Optional[ibm_watson.assistant_v1.WorkspaceSystemSettingsOffTopic] = None)[source]

Bases: object

Global settings for the workspace.

Attr WorkspaceSystemSettingsTooling tooling

(optional) Workspace settings related to the Watson Assistant user interface.

Attr WorkspaceSystemSettingsDisambiguation disambiguation

(optional) Workspace settings related to the disambiguation feature.

Attr dict human_agent_assist

(optional) For internal use only.

Attr bool spelling_suggestions

(optional) Whether spelling correction is enabled for the workspace.

Attr bool spelling_auto_correct

(optional) Whether autocorrection is enabled for the workspace. If spelling correction is enabled and this property is false, any suggested corrections are returned in the suggested_text property of the message response. If this property is true, any corrections are automatically applied to the user input, and the original text is returned in the original_text property of the message response.

Attr WorkspaceSystemSettingsSystemEntities system_entities

(optional) Workspace settings related to the behavior of system entities.

Attr WorkspaceSystemSettingsOffTopic off_topic

(optional) Workspace settings related to detection of irrelevant input.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceSystemSettings[source]

Initialize a WorkspaceSystemSettings object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class WorkspaceSystemSettingsDisambiguation(*, prompt: str = None, none_of_the_above_prompt: str = None, enabled: bool = None, sensitivity: str = None, randomize: bool = None, max_suggestions: int = None, suggestion_text_policy: str = None)[source]

Bases: object

Workspace settings related to the disambiguation feature.

Attr str prompt

(optional) The text of the introductory prompt that accompanies disambiguation options presented to the user.

Attr str none_of_the_above_prompt

(optional) The user-facing label for the option users can select if none of the suggested options is correct. If no value is specified for this property, this option does not appear.

Attr bool enabled

(optional) Whether the disambiguation feature is enabled for the workspace.

Attr str sensitivity

(optional) The sensitivity of the disambiguation feature to intent detection conflicts. Set to high if you want the disambiguation feature to be triggered more often. This can be useful for testing or demonstration purposes.

Attr bool randomize

(optional) Whether the order in which disambiguation suggestions are presented should be randomized (but still influenced by relative confidence).

Attr int max_suggestions

(optional) The maximum number of disambigation suggestions that can be included in a suggestion response.

Attr str suggestion_text_policy

(optional) For internal use only.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceSystemSettingsDisambiguation[source]

Initialize a WorkspaceSystemSettingsDisambiguation object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class SensitivityEnum(value)[source]

Bases: enum.Enum

The sensitivity of the disambiguation feature to intent detection conflicts. Set to high if you want the disambiguation feature to be triggered more often. This can be useful for testing or demonstration purposes.

AUTO = 'auto'
HIGH = 'high'
class WorkspaceSystemSettingsOffTopic(*, enabled: bool = None)[source]

Bases: object

Workspace settings related to detection of irrelevant input.

Attr bool enabled

(optional) Whether enhanced irrelevance detection is enabled for the workspace.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceSystemSettingsOffTopic[source]

Initialize a WorkspaceSystemSettingsOffTopic object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class WorkspaceSystemSettingsSystemEntities(*, enabled: bool = None)[source]

Bases: object

Workspace settings related to the behavior of system entities.

Attr bool enabled

(optional) Whether the new system entities are enabled for the workspace.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceSystemSettingsSystemEntities[source]

Initialize a WorkspaceSystemSettingsSystemEntities object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class WorkspaceSystemSettingsTooling(*, store_generic_responses: bool = None)[source]

Bases: object

Workspace settings related to the Watson Assistant user interface.

Attr bool store_generic_responses

(optional) Whether the dialog JSON editor displays text responses within the output.generic object.

classmethod from_dict(_dict: Dict)ibm_watson.assistant_v1.WorkspaceSystemSettingsTooling[source]

Initialize a WorkspaceSystemSettingsTooling object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.