Skip to content

Commit c62e27c

Browse files
committed
chore(assistantv1): regenerate assistant v1
1 parent a44ace8 commit c62e27c

File tree

1 file changed

+51
-23
lines changed

1 file changed

+51
-23
lines changed

ibm_watson/assistant_v1.py

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
# (C) Copyright IBM Corp. 2019, 2020.
3+
# (C) Copyright IBM Corp. 2020.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -27,8 +27,9 @@
2727
from datetime import datetime
2828
from enum import Enum
2929
from ibm_cloud_sdk_core import BaseService
30+
from ibm_cloud_sdk_core import DetailedResponse
3031
from ibm_cloud_sdk_core import datetime_to_string, string_to_datetime
31-
from ibm_cloud_sdk_core import get_authenticator_from_environment
32+
from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment
3233
from typing import Dict
3334
from typing import List
3435

@@ -98,7 +99,7 @@ def message(self,
9899
**Important:** This method has been superseded by the new v2 runtime API. The v2
99100
API offers significant advantages, including ease of deployment, automatic state
100101
management, versioning, and search capabilities. For more information, see the
101-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
102+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).
102103
There is no rate limit for this operation.
103104
104105
:param str workspace_id: Unique identifier of the workspace.
@@ -2598,7 +2599,7 @@ def create_dialog_node(self,
25982599
sibling.
25992600
:param DialogNodeOutput output: (optional) The output of the dialog node.
26002601
For more information about how to specify dialog node output, see the
2601-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
2602+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
26022603
:param dict context: (optional) The context for the dialog node.
26032604
:param dict metadata: (optional) The metadata for the dialog node.
26042605
:param DialogNodeNextStep next_step: (optional) The next step to execute
@@ -2783,7 +2784,7 @@ def update_dialog_node(self,
27832784
sibling.
27842785
:param DialogNodeOutput new_output: (optional) The output of the dialog
27852786
node. For more information about how to specify dialog node output, see the
2786-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
2787+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
27872788
:param dict new_context: (optional) The context for the dialog node.
27882789
:param dict new_metadata: (optional) The metadata for the dialog node.
27892790
:param DialogNodeNextStep new_next_step: (optional) The next step to
@@ -2937,7 +2938,7 @@ def list_logs(self,
29372938
parameter value with a minus sign (`-`).
29382939
:param str filter: (optional) A cacheable parameter that limits the results
29392940
to those matching the specified filter. For more information, see the
2940-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-filter-reference#filter-reference).
2941+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
29412942
:param int page_limit: (optional) The number of records to return in each
29422943
page of results.
29432944
:param str cursor: (optional) A token identifying the page of results to
@@ -2996,7 +2997,7 @@ def list_all_logs(self,
29962997
includes a value for `language`, as well as a value for
29972998
`request.context.system.assistant_id`, `workspace_id`, or
29982999
`request.context.metadata.deployment`. For more information, see the
2999-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-filter-reference#filter-reference).
3000+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
30003001
:param str sort: (optional) How to sort the returned log events. You can
30013002
sort by **request_timestamp**. To reverse the sort order, prefix the
30023003
parameter value with a minus sign (`-`).
@@ -3051,7 +3052,7 @@ def delete_user_data(self, customer_id: str,
30513052
You associate a customer ID with data by passing the `X-Watson-Metadata` header
30523053
with a request that passes data. For more information about personal data and
30533054
customer IDs, see [Information
3054-
security](https://cloud.ibm.com/docs/services/assistant?topic=assistant-information-security#information-security).
3055+
security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
30553056
This operation is limited to 4 requests per minute. For more information, see
30563057
**Rate limiting**.
30573058
@@ -3805,7 +3806,7 @@ class CreateValue():
38053806
A value can specify either synonyms or patterns (depending on the value type),
38063807
but not both. A pattern is a regular expression; for more information about how
38073808
to specify a pattern, see the
3808-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
3809+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
38093810
:attr datetime created: (optional) The timestamp for creation of the object.
38103811
:attr datetime updated: (optional) The timestamp for the most recent update to
38113812
the object.
@@ -3839,7 +3840,7 @@ def __init__(self,
38393840
value. A value can specify either synonyms or patterns (depending on the
38403841
value type), but not both. A pattern is a regular expression; for more
38413842
information about how to specify a pattern, see the
3842-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
3843+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
38433844
:param datetime created: (optional) The timestamp for creation of the
38443845
object.
38453846
:param datetime updated: (optional) The timestamp for the most recent
@@ -3953,7 +3954,7 @@ class DialogNode():
39533954
node. This property is omitted if the dialog node has no previous sibling.
39543955
:attr DialogNodeOutput output: (optional) The output of the dialog node. For
39553956
more information about how to specify dialog node output, see the
3956-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
3957+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
39573958
:attr dict context: (optional) The context for the dialog node.
39583959
:attr dict metadata: (optional) The metadata for the dialog node.
39593960
:attr DialogNodeNextStep next_step: (optional) The next step to execute
@@ -4027,7 +4028,7 @@ def __init__(self,
40274028
sibling.
40284029
:param DialogNodeOutput output: (optional) The output of the dialog node.
40294030
For more information about how to specify dialog node output, see the
4030-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
4031+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
40314032
:param dict context: (optional) The context for the dialog node.
40324033
:param dict metadata: (optional) The metadata for the dialog node.
40334034
:param DialogNodeNextStep next_step: (optional) The next step to execute
@@ -4645,7 +4646,7 @@ class DialogNodeOutput():
46454646
"""
46464647
The output of the dialog node. For more information about how to specify dialog node
46474648
output, see the
4648-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
4649+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
46494650
46504651
:attr List[DialogNodeOutputGeneric] generic: (optional) An array of objects
46514652
describing the output defined for the dialog node.
@@ -7914,6 +7915,16 @@ class RuntimeEntity():
79147915
:attr dict metadata: (optional) Any metadata for the entity.
79157916
:attr List[CaptureGroup] groups: (optional) The recognized capture groups for
79167917
the entity, as defined by the entity pattern.
7918+
:attr RuntimeEntityInterpretation interpretation: (optional) An object
7919+
containing detailed information about the entity recognized in the user input.
7920+
This property is included only if the new system entities are enabled for the
7921+
workspace.
7922+
For more information about how the new system entities are interpreted, see the
7923+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-system-entities).
7924+
:attr RuntimeEntityRole role: (optional) An object describing the role played by
7925+
a system entity that is specifies the beginning or end of a range recognized in
7926+
the user input. This property is included only if the new system entities are
7927+
enabled for the workspace.
79177928
"""
79187929

79197930
def __init__(self,
@@ -7923,7 +7934,9 @@ def __init__(self,
79237934
*,
79247935
confidence: float = None,
79257936
metadata: dict = None,
7926-
groups: List['CaptureGroup'] = None) -> None:
7937+
groups: List['CaptureGroup'] = None,
7938+
interpretation: 'RuntimeEntityInterpretation' = None,
7939+
role: 'RuntimeEntityRole' = None) -> None:
79277940
"""
79287941
Initialize a RuntimeEntity object.
79297942
@@ -9058,7 +9071,7 @@ class Value():
90589071
A value can specify either synonyms or patterns (depending on the value type),
90599072
but not both. A pattern is a regular expression; for more information about how
90609073
to specify a pattern, see the
9061-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
9074+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
90629075
:attr datetime created: (optional) The timestamp for creation of the object.
90639076
:attr datetime updated: (optional) The timestamp for the most recent update to
90649077
the object.
@@ -9092,7 +9105,7 @@ def __init__(self,
90929105
value. A value can specify either synonyms or patterns (depending on the
90939106
value type), but not both. A pattern is a regular expression; for more
90949107
information about how to specify a pattern, see the
9095-
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
9108+
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
90969109
:param datetime created: (optional) The timestamp for creation of the
90979110
object.
90989111
:param datetime updated: (optional) The timestamp for the most recent
@@ -9764,16 +9777,20 @@ class WorkspaceSystemSettings():
97649777
settings related to the disambiguation feature.
97659778
**Note:** This feature is available only to Plus and Premium users.
97669779
:attr dict human_agent_assist: (optional) For internal use only.
9780+
:attr WorkspaceSystemSettingsSystemEntities system_entities: (optional)
9781+
Workspace settings related to the behavior of system entities.
97679782
:attr WorkspaceSystemSettingsOffTopic off_topic: (optional) Workspace settings
97689783
related to detection of irrelevant input.
97699784
"""
97709785

9771-
def __init__(self,
9772-
*,
9773-
tooling: 'WorkspaceSystemSettingsTooling' = None,
9774-
disambiguation: 'WorkspaceSystemSettingsDisambiguation' = None,
9775-
human_agent_assist: dict = None,
9776-
off_topic: 'WorkspaceSystemSettingsOffTopic' = None) -> None:
9786+
def __init__(
9787+
self,
9788+
*,
9789+
tooling: 'WorkspaceSystemSettingsTooling' = None,
9790+
disambiguation: 'WorkspaceSystemSettingsDisambiguation' = None,
9791+
human_agent_assist: dict = None,
9792+
system_entities: 'WorkspaceSystemSettingsSystemEntities' = None,
9793+
off_topic: 'WorkspaceSystemSettingsOffTopic' = None) -> None:
97779794
"""
97789795
Initialize a WorkspaceSystemSettings object.
97799796
@@ -9783,20 +9800,24 @@ def __init__(self,
97839800
Workspace settings related to the disambiguation feature.
97849801
**Note:** This feature is available only to Plus and Premium users.
97859802
:param dict human_agent_assist: (optional) For internal use only.
9803+
:param WorkspaceSystemSettingsSystemEntities system_entities: (optional)
9804+
Workspace settings related to the behavior of system entities.
97869805
:param WorkspaceSystemSettingsOffTopic off_topic: (optional) Workspace
97879806
settings related to detection of irrelevant input.
97889807
"""
97899808
self.tooling = tooling
97909809
self.disambiguation = disambiguation
97919810
self.human_agent_assist = human_agent_assist
9811+
self.system_entities = system_entities
97929812
self.off_topic = off_topic
97939813

97949814
@classmethod
97959815
def from_dict(cls, _dict: Dict) -> 'WorkspaceSystemSettings':
97969816
"""Initialize a WorkspaceSystemSettings object from a json dictionary."""
97979817
args = {}
97989818
valid_keys = [
9799-
'tooling', 'disambiguation', 'human_agent_assist', 'off_topic'
9819+
'tooling', 'disambiguation', 'human_agent_assist',
9820+
'system_entities', 'off_topic'
98009821
]
98019822
bad_keys = set(_dict.keys()) - set(valid_keys)
98029823
if bad_keys:
@@ -9812,6 +9833,10 @@ def from_dict(cls, _dict: Dict) -> 'WorkspaceSystemSettings':
98129833
_dict.get('disambiguation'))
98139834
if 'human_agent_assist' in _dict:
98149835
args['human_agent_assist'] = _dict.get('human_agent_assist')
9836+
if 'system_entities' in _dict:
9837+
args[
9838+
'system_entities'] = WorkspaceSystemSettingsSystemEntities._from_dict(
9839+
_dict.get('system_entities'))
98159840
if 'off_topic' in _dict:
98169841
args['off_topic'] = WorkspaceSystemSettingsOffTopic._from_dict(
98179842
_dict.get('off_topic'))
@@ -9833,6 +9858,9 @@ def to_dict(self) -> Dict:
98339858
self,
98349859
'human_agent_assist') and self.human_agent_assist is not None:
98359860
_dict['human_agent_assist'] = self.human_agent_assist
9861+
if hasattr(self,
9862+
'system_entities') and self.system_entities is not None:
9863+
_dict['system_entities'] = self.system_entities._to_dict()
98369864
if hasattr(self, 'off_topic') and self.off_topic is not None:
98379865
_dict['off_topic'] = self.off_topic._to_dict()
98389866
return _dict

0 commit comments

Comments
 (0)