-
Notifications
You must be signed in to change notification settings - Fork 824
Migration
2018-03-09
- Change: update_workspace() has a new parameter
append - Change: message() has a new parameter
nodes_visited_details
- New:
create_expansions,delete_expansionsandlist_expansionshave been added
-
Change:
add_corpus()parameterfile_datarenamed tocorpus_file, additional parametercorpus_filename -
Change: SpeechToTextV1.init() does not take in keyword arguments. Its method signature is now:
def __init__(self, url=default_url, username=None, password=None)
-
Deprecated:
modelswould be deprecated, uselist_models -
Deprecated:
create_custom_modelwould be deprecated, usecreate_language_model -
Deprecated:
delete_custom_modelwould be deprecated, usedelete_language_model -
Deprecated:
get_custom_modelwould be deprecated, useget_language_model -
Deprecated:
list_custom_modelswould be deprecated, uselist_language_models -
Deprecated:
train_custom_modelwould be deprecated, usetrain_language_model -
Deprecated:
train_custom_modelwould be deprecated, usetrain_language_model -
Deprecated:
add_custom_wordwould be deprecated, useadd_word -
Deprecated:
add_custom_wordswould be deprecated, useadd_words -
Deprecated:
delete_custom_wordwould be deprecated, usedelete_word -
Deprecated:
get_custom_wordwould be deprecated, useget_word -
Deprecated:
list_custom_wordswould be deprecated, uselist_words -
Change:
recognize()have some parameters deprecated:continuousandinterim_results. The following is the method signature:def recognize(self, model=None, customization_id=None, acoustic_customization_id=None, customization_weight=None, version=None, audio=None, content_type='audio/basic', 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):
-
New: methods to handle asyncronous recognitions have been added:
- check_job, check_jobs, create_job and delete_job
-
New: methods to register and unregister callbac urls:
- register_callback and unregister_callback
-
New: methods around language models:
- reset_language_model and upgrade_language_model
-
New: methods supporting custom acoustic models:
- create_acoustic_model, delete_acoustic_model, get_acoustic_model, list_acoustic_models, reset_acoustic_model and train_acoustic_model
-
New: methods supporting custom audio resources:
- add_audio, delete_audio, get_audio, list_audio
- Change: TextToSpeechV1.init() does not take in keyword arguments. Its method signature is now:
def __init__(self, url=default_url, username=None, password=None)
- Change:
synthesizereturns a response object - Deprecated:
voiceswould be deprecated, uselist_voices - Deprecated:
pronunciationwould be deprecated, useget_pronunciation - Deprecated:m
create_customizationwould be deprecated, usecreate_voice_model - Deprecated:
delete_customizationwould be deprecated, usedelete_voice_model - Deprecated:
get_customizationwould be deprecated, useget_voice_model - Deprecated:
customizationswould be deprecated, uselist_voice_models - Deprecated:
update_customizationwould be deprecated, useupdate_voice_model - Deprecated:
set_customization_wordwould be deprecated, useadd_word - Deprecated:
add_customization_wordswould be deprecated, useadd_words - Deprecated:
delete_customization_wordwould be deprecated, usedelete_word - Deprecated:
get_customization_wordwould be deprecated, useget_word - Deprecated:
get_customization_wordswould be deprecated, uselist_words
This version of the SDK accepts either models or dicts as input parameters and produces dicts as method responses. Models for response classes are still generated and not pruned, so users can create a model from the returned dict.
-
message()parametermessage_inputrenamed toinput
-
create_configuration()parameterconfig_data={"name": ""}renamed toname -
update_configuration()parameterconfig_data={"name": ""}renamed toname -
add_document()parameterfile_datais removed. File contents are now passed with thefile/filenameparameters. -
update_document()parametersmime_typerenamed tofile_content_type,file_infoandfile_datareplaced byfile, andfilenameis the file name given to the file - Some methods have been renamed:
- get_environments -> list_environments
- test_document -> test_configuration_in_environment
- get_document -> get_document_status
- delete_training_data -> delete_all_training_data
- add_training_data_query -> add_training_data
- delete_training_data_query -> delete_training_data
- get_training_data_query -> get_training_data
- add_training_data_query_example -> create_training_example
- delete_training_data_query_example -> delete_training_example
- get_training_data_query_example -> get_training_example
- update_training_data_query_example -> update_training_example
-
list_training_data_query_examples()is removed -
query()parameterquery_optionschanged tofilter
- Some methods have been renamed:
- get_models -> list_models
- get_identifiable_languages -> list_identifiable_languages
- Some methods have been renamed:
- list -> list_classifiers
- status -> get_classifier
- create -> create_classifier
-
create_classifier()parametermetadatahas been added
-
- remove -> delete_classifier
-
analyze()parameterlimit_text_charactershas been added -
Dropped hand-written
Featuresmodule in favor of generated Features model. For example:natural_language_understanding.analyze( text='Messi is the best', features=[Features.Entities(), Features.Keywords ()])
is now:
natural_language_understanding.analyze( text='Messi is the best', features=Features(entities=EntitiesOptions(), keywords=KeywordsOptions()))
-
tone()parameters have been reordered:tone(self, tone_input, content_type='application/json', sentences=None, tones=None, content_language=None, accept_language=None)
-
tone()parametertextreplaced bytone_input -
tone()parametercontent_typedefault value changed fromtext/plaintoapplication/json -
tone()parameterscontent_languageandaccept_languagehave been addedtone(self, text, tones=None, sentences=None, content_type='text/plain')
is now:
tone(tone_input, content_type='application/json', sentences=None, content_language=None, accept_language=None):
-
profile()parametertextchanged tocontent -
profile()parametercontent_typedefault value changed fromtext/plaintoapplication/json -
profile()parameteracceptis removed
-
classify parametersimages_url,classifier_ids,owners, and xxx replaced withparameters`.classify(images_file=images_file, threshold=0.1, classifier_ids=['CarsvsTrucks_1479118188', 'default'])
is now:
parameters = json.dumps({'threshold': 0.1, 'classifier_ids': ['CarsvsTrucks_1479118188', 'default']}) visual_recognition.classify(images_file=images_file, parameters=parameters)