Skip to content
Ajiemar Santiago edited this page Oct 1, 2018 · 30 revisions

Latest version

Newest release features and bug fix information is here: https://github.com/watson-developer-cloud/python-sdk/releases

2.1.0 (2018-09-21)

Features

  • AssistantV2: New service AssistantV2 (a715334)
  • SSL: Support to disable SSL certificate verification (e0f1d11)

Version 2.0.1

2018-09-12

GENERAL CHANGES FOR ALL SERVICES:

  • 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,
    ):

PERSONALITY INSIGHTS:

  • 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):

VISUAL RECOGNITION:

  • classify would no longer support the parameters 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 the parameters keyword, the new interface is:
    def detect_faces(self,
                     images_file=None,
                     url=None,
                     images_file_content_type=None,
                     images_filename=None,
                     **kwargs):

SPEECH TO TEXT:

  • recognize parameter reordering and version parameter renamed to base_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 and version parameter renamed to base_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 supports corpus_file_content_type and corpus_filename. The corpus_file should be A TEXT 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 type AudioSource
    • recognize_callback’s on_transcription () and on_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):

Version 1.5.0

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.

Version 1.4.1

2018-06-29

Change: Language Translator V2

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.

Version 1.4.0

2018-06-12

New: Language Translator V3.

Example using IAM authentication

    service = watson_developer_cloud.LanguageTranslatorV3(
        version='2018-05-01',
        iam_api_key='iam_api_key')

New: recognize_with_websocket() in Speech to Text

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.

Version 1.3.5

2018-05-30

New method delete_user_data() for Speech to Text, Text to Speech and Visual Recognition

Version 1.3.4

2018-05-18

New method delete_user_data() for Assistant and Discovery

Version 1.3.3

2018-04-23

New: Authentication support through IAM(Identity and Access Management.

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):

Version 1.3.2

2018-04-17

New: Ability to send request headers

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'})

New: Ability to parse response info

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)

Version 1.3.0

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

Version 1.2.1

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

Version 1.2.0

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.

Version 1.1.0

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.

Version 1.0.2

2017-12-11

  • 08c4f19d52ace329419618bb210429529733a8ee New: Regenerated Discovery V1, added query relation
  • 978b894757b9354dc46403d646b1aeb7904c9cbb New: Renerated Natural Language Understanding

Version 1.0.1

2017-11-28

  • ba62ca2 Fixed fix add_custom_word() to use PUT
  • 5d8872d New: add train_custom_model and update custom_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 to recognize() for Speech to Text
  • 9289a2b Fixed: create-classifier to pass training_metadata correctly

Version 1.0.0

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.

Version 0.26.1

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

Version 0.26.0

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

Version 0.25.2

2017-03-21

  • Fixed: Speech to text supports customization_id
  • Fixed: Discovery now can create free instances

Version 0.25.1

2017-02-28

  • Fixed: Natural Language Understanding base url

Version 0.25.0

2017-02-23

  • Fixed: Natural Language Understanding importing
  • Added: Conversation workspace updating

Version 0.24.0

2017-02-21

  • Added: Discovery configuration APIs
  • Added: Tradeoff Analytics find_preferable_options flag

Version 0.23.0

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

Version 0.22.0

2016-11-03

  • Added: Tradeoff Analytics generate_visualization flag
  • Fixed: AlchemyLanguage flags now passed as form fields when using POST

Version 0.21.0

2016-10-28

  • Added: Personality Insights v3

Version 0.20.1

2016-10-13

  • Fixed: Issue with Speech to Text parameters not working

Version 0.20.0

2016-09-30

  • Added: Language Translator
  • Fixed: Deprecation to Language Translation
  • Removed: Conversation v1 experimental

Version 0.19.0

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

Version 0.18.0

2016-07-22

  • Added: Retraining for Visual Recognition classifiers
  • Added: Using custom models for Alchemy Language entities

Version 0.17.1

2016-07-17

  • Fixed: x_watson_learning_opt_out value

Version 0.17.0

2016-07-14

  • Fixed: Conversation default url
  • Added: x_watson_learning_opt_out option on the WatsonDeveloperCloud service

Version 0.16.0

2016-07-12

  • New: Conversation v1 service

Version 0.15.0

2016-07-07

  • New: index_document in Document Conversion
  • Fixed: bug with model_id in translation

Version 0.14.0

2016-06-12

  • New: Conversation v1 experimental service

Version 0.13.0

2016-06-07

  • New: Visual Recognition v3 service
  • New: Alchemy Language typed_relations