| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2018-07-12
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()) def __init__(
self,
url=default_url,
username=None,
password=None,
iam_apikey=None,
iam_access_token=None,
iam_url=None,
): def profile(self,
content,
content_type,
accept=None,
content_language=None,
accept_language=None,
raw_scores=None,
csv_headers=None,
consumption_preferences=None,
**kwargs): 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): def detect_faces(self,
images_file=None,
url=None,
images_file_content_type=None,
images_filename=None,
**kwargs): 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): 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): def add_corpus(self,
customization_id,
corpus_name,
corpus_file,
allow_overwrite=None,
**kwargs): def add_word(self,
customization_id,
word_name,
word=None,
sounds_like=None,
display_as=None,
**kwargs): 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-03-09
def recognize_with_websocket(self,
audio=None,
content_type='audio/l16; rate=44100',
model='en-US_BroadbandModel',
recognize_callback=None,
customization_id=None,
acoustic_customization_id=None,
customization_weight=None,
version=None,
inactivity_timeout=None,
interim_results=True,
keywords=None,
keywords_threshold=None,
max_alternatives=1,
word_alternatives_threshold=None,
word_confidence=False,
timestamps=False,
profanity_filter=None,
smart_formatting=False,
speaker_labels=None): def __init__(self, url=default_url, username=None, password=None) 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): def __init__(self, url=default_url, username=None, password=None) def classify(self,
images_file=None,
accept_language=None,
images_file_content_type=None,
images_filename=None):
images_filename=None,
url=None,
threshold=None,
owners=None,
classifier_ids=None): def detect_faces(self,
images_file=None,
images_file_content_type=None,
images_filename=None):
images_filename=None,
url=None): def tone(self,
tone_input,
content_type,
sentences=None,
tones=None,
content_language=None,
accept_language=None)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.
analyze() parameter limit_text_characters has been added
Dropped hand-written Features module 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() parameter text replaced by tone_input
tone() parameter content_type default value changed from text/plain to application/json
tone() parameters content_language and accept_language have been added
tone(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):classify parameters images_url, classifier_ids, owners, and xxx replaced with parameters`.
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)| Back | FazBrowse Home | New Git URL |