|
1 | 1 | # coding: utf-8
|
2 | 2 |
|
3 |
| -# (C) Copyright IBM Corp. 2019, 2020. |
| 3 | +# (C) Copyright IBM Corp. 2020. |
4 | 4 | #
|
5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License");
|
6 | 6 | # you may not use this file except in compliance with the License.
|
|
26 | 26 | from .common import get_sdk_headers
|
27 | 27 | from enum import Enum
|
28 | 28 | from ibm_cloud_sdk_core import BaseService
|
29 |
| -from ibm_cloud_sdk_core import get_authenticator_from_environment |
| 29 | +from ibm_cloud_sdk_core import DetailedResponse |
| 30 | +from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment |
30 | 31 | from typing import Dict
|
31 | 32 | from typing import List
|
32 | 33 |
|
@@ -86,13 +87,13 @@ def create_session(self, assistant_id: str, **kwargs) -> 'DetailedResponse':
|
86 | 87 | responses. It also maintains the state of the conversation. A session persists
|
87 | 88 | until it is deleted, or until it times out because of inactivity. (For more
|
88 | 89 | information, see the
|
89 |
| - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-settings). |
| 90 | + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings). |
90 | 91 |
|
91 | 92 | :param str assistant_id: Unique identifier of the assistant. To find the
|
92 | 93 | assistant ID in the Watson Assistant user interface, open the assistant
|
93 | 94 | settings and click **API Details**. For information about creating
|
94 | 95 | assistants, see the
|
95 |
| - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). |
| 96 | + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task). |
96 | 97 | **Note:** Currently, the v2 API does not support creating assistants.
|
97 | 98 | :param dict headers: A `dict` containing the request headers
|
98 | 99 | :return: A `DetailedResponse` containing the result, headers and HTTP status code.
|
@@ -129,13 +130,13 @@ def delete_session(self, assistant_id: str, session_id: str,
|
129 | 130 |
|
130 | 131 | Deletes a session explicitly before it times out. (For more information about the
|
131 | 132 | session inactivity timeout, see the
|
132 |
| - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-settings)). |
| 133 | + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings)). |
133 | 134 |
|
134 | 135 | :param str assistant_id: Unique identifier of the assistant. To find the
|
135 | 136 | assistant ID in the Watson Assistant user interface, open the assistant
|
136 | 137 | settings and click **API Details**. For information about creating
|
137 | 138 | assistants, see the
|
138 |
| - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). |
| 139 | + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task). |
139 | 140 | **Note:** Currently, the v2 API does not support creating assistants.
|
140 | 141 | :param str session_id: Unique identifier of the session.
|
141 | 142 | :param dict headers: A `dict` containing the request headers
|
@@ -189,7 +190,7 @@ def message(self,
|
189 | 190 | assistant ID in the Watson Assistant user interface, open the assistant
|
190 | 191 | settings and click **API Details**. For information about creating
|
191 | 192 | assistants, see the
|
192 |
| - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-add#assistant-add-task). |
| 193 | + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task). |
193 | 194 | **Note:** Currently, the v2 API does not support creating assistants.
|
194 | 195 | :param str session_id: Unique identifier of the session.
|
195 | 196 | :param MessageInput input: (optional) An input object that includes the
|
@@ -1186,6 +1187,31 @@ def __ne__(self, other: 'MessageContextGlobalSystem') -> bool:
|
1186 | 1187 | """Return `true` when self and other are not equal, false otherwise."""
|
1187 | 1188 | return not self == other
|
1188 | 1189 |
|
| 1190 | + class LocaleEnum(Enum): |
| 1191 | + """ |
| 1192 | + The language code for localization in the user input. The specified locale |
| 1193 | + overrides the default for the assistant, and is used for interpreting entity |
| 1194 | + values in user input such as date values. For example, `04/03/2018` might be |
| 1195 | + interpreted either as April 3 or March 4, depending on the locale. |
| 1196 | + This property is included only if the new system entities are enabled for the |
| 1197 | + skill. |
| 1198 | + """ |
| 1199 | + EN_US = "en-us" |
| 1200 | + EN_CA = "en-ca" |
| 1201 | + EN_GB = "en-gb" |
| 1202 | + AR_AR = "ar-ar" |
| 1203 | + CS_CZ = "cs-cz" |
| 1204 | + DE_DE = "de-de" |
| 1205 | + ES_ES = "es-es" |
| 1206 | + FR_FR = "fr-fr" |
| 1207 | + IT_IT = "it-it" |
| 1208 | + JA_JP = "ja-jp" |
| 1209 | + KO_KR = "ko-kr" |
| 1210 | + NL_NL = "nl-nl" |
| 1211 | + PT_BR = "pt-br" |
| 1212 | + ZH_CN = "zh-cn" |
| 1213 | + ZH_TW = "zh-tw" |
| 1214 | + |
1189 | 1215 |
|
1190 | 1216 | class MessageContextSkill():
|
1191 | 1217 | """
|
|
0 commit comments