Previously different parameters were passed into the service constructor for authentication.
def example
service = IBMWatson::AssistantV1.new(
iam_apikey: "{iam_apikey}",
url: "{service_endpoint}",
version: "{version_date}"
);
service.url = "{service_endpoint}";
end
Now we use an Authenticator
to authenticate the service. Available authentication schemes include IamAuthenticator
, BasicAuthenticator
, CloudPakForDataAuthenticator
and BearerTokenAuthenticator
def example
authenticator = IBMWatson::Authenticators::IamAuthenticator.new(
apikey: "{apikey}"
)
service = IBMWatson::AssistantV1.new(
authenticator: authenticator,
version: "{version_date}"
);
service.service_url = "{serviceUrl}";
end
def example
authenticator = IBMWatson::Authenticators::BasicAuthenticator.new(
username: "{username}",
password: "{password}"
)
service = IBMWatson::AssistantV1.new(
authenticator: authenticator,
version: "{version_date}"
);
service.service_url = "{serviceUrl}";
end
authenticator = IBMWatson::Authenticators::BearerTokenAuthenticator.new(
bearer_token: "{bearerToken}"
)
service = IBMWatson::AssistantV1.new(
authenticator: authenticator,
version: "{version_date}"
);
service.service_url = "{serviceUrl}";
authenticator = IBMWatson::Authenticators::CloudPakForDataAuthenticator.new(
url: "https://{cp4d_cluster_host}{:port}",
username: "{username}",
password: "{password}"
)
service = IBMWatson::AssistantV1.new(
authenticator: authenticator,
version: "{version_date}"
);
service.service_url = "{serviceUrl}";
You can supply credentials to your service using external ibm-credentials.env
files.
service = IBMWatson::AssistantV1.new(
version: "{version_date}"
);
response = service.list_workspaces.result
puts JSON.pretty_generate(response)
Previously we would look for these files first in the system home
directory, followed by the current project directory.
Now in order to allow developers to have different configurations for each project we look first in the current project directory, followed by the home directory.
Previously we set the service url by setting url.
def example
service = IBMWatson::AssistantV1.new(
iam_apikey: "{iam_apikey}",
url: "{service_endpoint}",
version: "{version_date}"
);
service.url = "{service_endpoint}";
end
Now we set the service url by calling the service_url
setter.
def example
authenticator = IBMWatson::Authenticators::IamAuthenticator.new(
apikey: "{apikey}"
)
service = IBMWatson::AssistantV1.new(
authenticator: authenticator,
version: "{version_date}"
);
service.service_url = "{serviceUrl}";
end
include_count
is no longer a parameter of thelist_workspaces()
methodinclude_count
is no longer a parameter of thelist_intents()
methodinclude_count
is no longer a parameter of thelist_examples()
methodinclude_count
is no longer a parameter of thelist_counterexamples()
methodinclude_count
is no longer a parameter of thelist_entities()
methodinclude_count
is no longer a parameter of thelist_values()
methodinclude_count
is no longer a parameter of thelist_synonyms()
methodinclude_count
is no longer a parameter of thelist_dialogNodes()
methodvalue_type
was renamed totype
in thecalue()
methodnew_value_type
was renamed tonewType
in theupdate_value()
methodnode_type
was renamed totype
in thecreate_dialog_node()
methodnode_type
was renamed totype
in thecreate_dialog_node()
methodnew_node_type
was renamed tonew_type
in theupdate_dialog_node()
method
convert_to_html()
method does not require afilename
parameter
return_fields
was renamed to_return
in thequery()
methodlogging_optOut
was renamed tox_watson_logging_optOut
in thequery()
methodspelling_suggestions
was added to thequery()
methodcollection_ids
is no longer a parameter of thequery()
methodreturn_fields
was renamed to_return
in theQueryNotices()
methodlogging_optOut
was renamed tox_watson_logging_optOut
in thefederated_query()
methodcollection_ids
is now required in thefederated_query()
methodcollection_ids
changed position in thefederated_query()
methodreturn_fields
was renamed to_return
in thefederated_query()
methodreturn_fields
was renamed to_return
in thefederated_query_notices()
methodtest_configuration_in_environment()
method was removedquery_entities()
method was removedquery_relations()
method was removed
default_models
was renamed to_default
in thelist_models()
method
metadata
was renamed totraining_metadata
in thecreate_classifier()
method
strict
is no longer a parameter of thetrain_acoustic_model()
methodrecognize_with_websocket()
method was removed
detect_faces()
method was removed
- New service!