-
Notifications
You must be signed in to change notification settings - Fork 827
Changelog
Newest release features and bug fix information is here: https://github.com/watson-developer-cloud/python-sdk/releases
2.1.0 (2018-09-21)
- AssistantV2: New service AssistantV2 (a715334)
- SSL: Support to disable SSL certificate verification (e0f1d11)
2018-09-12
-
DetailedResponse is now the default response which contains the result, headers and HTTP status code. Previously, the response only contained the direct response from the service. Use
get_result()
to obtain the method response.
from watson_developer_cloud import AssistantV1
assistant = AssistantV1(
username='xxx',
password='yyy',
version='2017-04-21')
response = assistant.list_workspaces(headers={'Custom-Header': 'custom_value'})
print(response.get_result())
print(response.get_headers())
print(response.get_status_code())
- iam_api_key renamed to iam_apikey The constructor for each service now looks like:
def __init__(
self,
url=default_url,
username=None,
password=None,
iam_apikey=None,
iam_access_token=None,
iam_url=None,
):
-
profile
method parameter reordering:
def profile(self,
content,
content_type,
accept=None,
content_language=None,
accept_language=None,
raw_scores=None,
csv_headers=None,
consumption_preferences=None,
**kwargs):
-
classify
would no longer support theparameters
keyword, the new interface is:
def classify(self,
images_file=None,
accept_language=None,
url=None,
threshold=None,
owners=None,
classifier_ids=None,
images_file_content_type=None,
images_filename=None,
**kwargs):
-
detect_faces
would no longer support theparameters
keyword, the new interface is:
def detect_faces(self,
images_file=None,
url=None,
images_file_content_type=None,
images_filename=None,
**kwargs):
-
recognize
parameter reordering andversion
parameter renamed tobase_model_version
def recognize(self,
audio,
content_type,
model=None,
customization_id=None,
acoustic_customization_id=None,
base_model_version=None,
customization_weight=None,
inactivity_timeout=None,
keywords=None,
keywords_threshold=None,
max_alternatives=None,
word_alternatives_threshold=None,
word_confidence=None,
timestamps=None,
profanity_filter=None,
smart_formatting=None,
speaker_labels=None,
**kwargs):
-
create_job
, parameter reordering andversion
parameter renamed tobase_model_version
def create_job(self,
audio,
content_type,
model=None,
callback_url=None,
events=None,
user_token=None,
results_ttl=None,
customization_id=None,
acoustic_customization_id=None,
base_model_version=None,
customization_weight=None,
inactivity_timeout=None,
keywords=None,
keywords_threshold=None,
max_alternatives=None,
word_alternatives_threshold=None,
word_confidence=None,
timestamps=None,
profanity_filter=None,
smart_formatting=None,
speaker_labels=None,
**kwargs):
-
add_corpus
no longer supportscorpus_file_content_type
andcorpus_filename
. The corpus_file should be ATEXT
file.
def add_corpus(self,
customization_id,
corpus_name,
corpus_file,
allow_overwrite=None,
**kwargs):
add_word
def add_word(self,
customization_id,
word_name,
word=None,
sounds_like=None,
display_as=None,
**kwargs):
-
recognize_using_websocket
- A new underlying websocket client is now used
-
audio
is of typeAudioSource
-
recognize_callback
’son_transcription ()
andon_hypothesis ()
results swapped with each other
def recognize_using_websocket(self,
audio,
content_type,
recognize_callback,
model=None,
customization_id=None,
acoustic_customization_id=None,
customization_weight=None,
base_model_version=None,
inactivity_timeout=None,
interim_results=None,
keywords=None,
keywords_threshold=None,
max_alternatives=None,
word_alternatives_threshold=None,
word_confidence=None,
timestamps=None,
profanity_filter=None,
smart_formatting=None,
speaker_labels=None,
http_proxy_host=None,
http_proxy_port=None,
**kwargs):
2018-07-12
- New: regenerated DiscoveryV1 with new methods
create_credentials
,get_credentials
,update_credentials
,list_credentials
,delete_credentials
. - Deprecate: X-Watson-Authorization-Token header for cloud foundry is deprecated.
2018-06-29
The V2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the V3 API.
2018-06-12
Example using IAM authentication
service = watson_developer_cloud.LanguageTranslatorV3(
version='2018-05-01',
iam_api_key='iam_api_key')
recognize_with_websocket
in Speech to text has an additional method in recognize_callback
called on_data
that would return unparsed data from the service.
2018-05-30
New method delete_user_data()
for Speech to Text, Text to Speech and Visual Recognition
2018-05-18
New method delete_user_data()
for Assistant and Discovery
2018-04-23
The service constructors are now updated to take in IAM details:
def __init__(self,
version,
url=default_url,
username=None,
password=None,
iam_api_key=None,
iam_access_token=None,
iam_url=None):
2018-04-17
Custom headers can be passed in any request in the form of a dict
as:
headers = {
'Custom-Header': 'custom_value'
}
For example, to send a header called Custom-Header
to a call in Watson Assistant, pass
the headers parameter as:
from watson_developer_cloud import AssistantV1
assistant = AssistantV1(
username='xxx',
password='yyy',
version='2017-04-21')
response = assistant.list_workspaces(headers={'Custom-Header': 'custom_value'})
If you would like access to some HTTP response information along with the response model, you can set the set_detailed_response()
to True
from watson_developer_cloud import AssistantV1
assistant = AssistantV1(
username='xxx',
password='yyy',
version='2017-04-21')
assistant.set_detailed_response(True)
response = assistant.list_workspaces()
print(response)
print(response.headers)
2018-04-05
- Docs: Update README with a workaround for Python Notebooks in DSK
- New: Regenerated Natural Language Classifier with new method
classify_collection
- New: Regenerated Watson Assistant and Conversation
- New: Regenerated Visual Recognition
- Added
get_core_ml_model
- Removed beta feature
detect_faces
- Added
2018-03-23
- Fixed: Regenerated Assistant which now has conversation_id, system, created_at, updated_at as optional
- Fixed: Regenerated Conversation which now has conversation_id, system, created_at, updated_at as optional
2018-03-15
Services that are generated the first time:
- Assistant The IBM Watson Assistant service combines machine learning, natural language understanding, and integrated dialog tools to create conversation flows between your apps and your users.
For now, it is rebranding of the conversation service. You can also put in the username
and password
of the conversation service as the functionality is the same and migrating would involve renaming class references.
2018-03-09
Services that are generated the first time:
- Speech to Text
- Text to Speech
In the above services, many methods would be deprecated. Try to move to the new ones.
Services that are Deprecated
- Retrieve and Rank
- Document Conversion
- Tradeoff Analytics
- Alchemy
- Dialog
The error response also has the response
, global transaction id
and transaction id
added
Upon upgrading the SDK, follow the migration guide here.
2017-12-11
- 08c4f19d52ace329419618bb210429529733a8ee New: Regenerated Discovery V1, added query relation
- 978b894757b9354dc46403d646b1aeb7904c9cbb New: Renerated Natural Language Understanding
2017-11-28
- ba62ca2 Fixed fix
add_custom_word()
to use PUT - 5d8872d New: add
train_custom_model
and updatecustom_model
tests - 038b47c Misc: remove reduntant is
None
checks - 9993f13 Fixed: path to open in examples
- 203f131 Fixed: update Natural Language Classifier examples to use new method signatures
- 32adf85 Fixed: add
customization_weight
parameter torecognize()
for Speech to Text - 9289a2b Fixed:
create-classifier
to passtraining_metadata
correctly
2017-11-13
Version 1.0 introduces automatically generated service classes for several services.
Services that are not affected in this release:
- Speech to Text
- Text to Speech
- Retrieve and Rank
- Document Conversion
- Tradeoff Analytics
Services that are affected in this release:
- Discovery
- Conversation
- Natural Language Understanding
- Natural Language Classifier
- Tone Analyzer
- Language Translator
- Personality Insights
- Visual Recognition
Upon upgrading the SDK, follow the migration guide here.
2017-07-11
- Added: Upload document method in Discovery
- Fixed:
features
is not defined in NLU test - Fixed: Discovery create_collection must send JSON
- Added: Support for JSON and HTML input to
tone()
- Fixed: Renaming methods to use snake case
- Added: Add list models method to NLU
- Fixed:
SpeechToTextV1.add_corpus()
to use POST instead of GET
2017-05-16
- Added: Conversation endpoints for 2017-04-21 service release (entities, logs)
- Added: Tone Analyzer
tone_chat
- Fixed: Unicode issues in Python 3
2017-03-21
- Fixed: Speech to text supports
customization_id
- Fixed: Discovery now can create free instances
2017-02-28
- Fixed: Natural Language Understanding base url
2017-02-23
- Fixed: Natural Language Understanding importing
- Added: Conversation workspace updating
2017-02-21
- Added: Discovery configuration APIs
- Added: Tradeoff Analytics find_preferable_options flag
2016-12-21
- Added: Discovery v1
- Fixed: Retrieve and Rank
top_answers
- Added: Tone Analyzer + Conversation example
- Added:
speaker_labels
to Speech to Text - Fixed: Using UTF-8 when installing the documentation from the README in
setup.py
- Added: Speech to Text customizations
- Added: Unit tests for AlchemyLanguage, Speech to Text and Discovery
2016-11-03
- Added: Tradeoff Analytics
generate_visualization
flag - Fixed: AlchemyLanguage flags now passed as form fields when using
POST
2016-10-28
- Added: Personality Insights v3
2016-10-13
- Fixed: Issue with Speech to Text parameters not working
2016-09-30
- Added: Language Translator
- Fixed: Deprecation to Language Translation
- Removed: Conversation v1 experimental
2016-08-30
- Fixed: Typo in the "language" parameter in Alchemy Language
- Added: Targeted Emotion in Alchemy Language
- Added: More supported parameters in Alchemy Language
2016-07-22
- Added: Retraining for Visual Recognition classifiers
- Added: Using custom models for Alchemy Language entities
2016-07-17
- Fixed:
x_watson_learning_opt_out
value
2016-07-14
- Fixed: Conversation default url
- Added:
x_watson_learning_opt_out
option on the WatsonDeveloperCloud service
2016-07-12
- New: Conversation v1 service
2016-07-07
- New: index_document in Document Conversion
- Fixed: bug with model_id in translation
2016-06-12
- New: Conversation v1 experimental service
2016-06-07
- New: Visual Recognition v3 service
- New: Alchemy Language typed_relations