Skip to content

Commit c538bd2

Browse files
committed
feat: regenerate services based on current API def
1 parent fa2cd1b commit c538bd2

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

ibm_watson/discovery_v2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ def update_document(self,
585585
**Note:** This operation only works on collections created to accept direct file
586586
uploads. It cannot be used to modify a collection that connects to an external
587587
source such as Microsoft SharePoint.
588+
**Note:** If an uploaded document is segmented, all segments will be overwritten,
589+
even if the updated version of the document has fewer segments.
588590
589591
:param str project_id: The ID of the project. This information can be found
590592
from the deploy page of the Discovery administrative tooling.
@@ -665,6 +667,8 @@ def delete_document(self,
665667
**Note:** This operation only works on collections created to accept direct file
666668
uploads. It cannot be used to modify a collection that connects to an external
667669
source such as Microsoft SharePoint.
670+
**Note:** Segments of an uploaded document cannot be deleted individually. Delete
671+
all segments by deleting using the `parent_document_id` of a segment result.
668672
669673
:param str project_id: The ID of the project. This information can be found
670674
from the deploy page of the Discovery administrative tooling.

ibm_watson/natural_language_understanding_v1.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,8 +2701,10 @@ class Model():
27012701
:attr str description: (optional) Model description.
27022702
:attr str workspace_id: (optional) ID of the Watson Knowledge Studio workspace
27032703
that deployed this model to Natural Language Understanding.
2704-
:attr str version: (optional) The model version, if it was manually provided in
2705-
Watson Knowledge Studio.
2704+
:attr str model_version: (optional) The model version, if it was manually
2705+
provided in Watson Knowledge Studio.
2706+
:attr str version: (optional) (Deprecated — use `model_version`) The model
2707+
version, if it was manually provided in Watson Knowledge Studio.
27062708
:attr str version_description: (optional) The description of the version, if it
27072709
was manually provided in Watson Knowledge Studio.
27082710
:attr datetime created: (optional) A dateTime indicating when the model was
@@ -2716,6 +2718,7 @@ def __init__(self,
27162718
language: str = None,
27172719
description: str = None,
27182720
workspace_id: str = None,
2721+
model_version: str = None,
27192722
version: str = None,
27202723
version_description: str = None,
27212724
created: datetime = None) -> None:
@@ -2730,8 +2733,10 @@ def __init__(self,
27302733
:param str description: (optional) Model description.
27312734
:param str workspace_id: (optional) ID of the Watson Knowledge Studio
27322735
workspace that deployed this model to Natural Language Understanding.
2733-
:param str version: (optional) The model version, if it was manually
2736+
:param str model_version: (optional) The model version, if it was manually
27342737
provided in Watson Knowledge Studio.
2738+
:param str version: (optional) (Deprecated — use `model_version`) The model
2739+
version, if it was manually provided in Watson Knowledge Studio.
27352740
:param str version_description: (optional) The description of the version,
27362741
if it was manually provided in Watson Knowledge Studio.
27372742
:param datetime created: (optional) A dateTime indicating when the model
@@ -2742,6 +2747,7 @@ def __init__(self,
27422747
self.language = language
27432748
self.description = description
27442749
self.workspace_id = workspace_id
2750+
self.model_version = model_version
27452751
self.version = version
27462752
self.version_description = version_description
27472753
self.created = created
@@ -2752,7 +2758,7 @@ def from_dict(cls, _dict: Dict) -> 'Model':
27522758
args = {}
27532759
valid_keys = [
27542760
'status', 'model_id', 'language', 'description', 'workspace_id',
2755-
'version', 'version_description', 'created'
2761+
'model_version', 'version', 'version_description', 'created'
27562762
]
27572763
bad_keys = set(_dict.keys()) - set(valid_keys)
27582764
if bad_keys:
@@ -2769,6 +2775,8 @@ def from_dict(cls, _dict: Dict) -> 'Model':
27692775
args['description'] = _dict.get('description')
27702776
if 'workspace_id' in _dict:
27712777
args['workspace_id'] = _dict.get('workspace_id')
2778+
if 'model_version' in _dict:
2779+
args['model_version'] = _dict.get('model_version')
27722780
if 'version' in _dict:
27732781
args['version'] = _dict.get('version')
27742782
if 'version_description' in _dict:
@@ -2795,6 +2803,8 @@ def to_dict(self) -> Dict:
27952803
_dict['description'] = self.description
27962804
if hasattr(self, 'workspace_id') and self.workspace_id is not None:
27972805
_dict['workspace_id'] = self.workspace_id
2806+
if hasattr(self, 'model_version') and self.model_version is not None:
2807+
_dict['model_version'] = self.model_version
27982808
if hasattr(self, 'version') and self.version is not None:
27992809
_dict['version'] = self.version
28002810
if hasattr(

ibm_watson/text_to_speech_v1.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@
1919
dialects, and voices. The service supports at least one male or female voice, sometimes
2020
both, for each language. The audio is streamed back to the client with minimal delay.
2121
For speech synthesis, the service supports a synchronous HTTP Representational State
22-
Transfer (REST) interface. It also supports a WebSocket interface that provides both plain
23-
text and SSML input, including the SSML <mark> element and word timings. SSML is an
24-
XML-based markup language that provides text annotation for speech-synthesis applications.
25-
The service also offers a customization interface. You can use the interface to define
26-
sounds-like or phonetic translations for words. A sounds-like translation consists of one
27-
or more words that, when combined, sound like the word. A phonetic translation is based on
28-
the SSML phoneme format for representing a word. You can specify a phonetic translation in
29-
standard International Phonetic Alphabet (IPA) representation or in the proprietary IBM
30-
Symbolic Phonetic Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages
31-
support only IPA.
22+
Transfer (REST) interface and a WebSocket interface. Both interfaces support plain text
23+
and SSML input. SSML is an XML-based markup language that provides text annotation for
24+
speech-synthesis applications. The WebSocket interface also supports the SSML
25+
<code>&lt;mark&gt;</code> element and word timings.
26+
The service offers a customization interface that you can use to define sounds-like or
27+
phonetic translations for words. A sounds-like translation consists of one or more words
28+
that, when combined, sound like the word. A phonetic translation is based on the SSML
29+
phoneme format for representing a word. You can specify a phonetic translation in standard
30+
International Phonetic Alphabet (IPA) representation or in the proprietary IBM Symbolic
31+
Phonetic Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages support
32+
only IPA.
3233
"""
3334

3435
import json

0 commit comments

Comments
 (0)