Previously different Config objects were used for authentication.
void Example()
{
TokenOptions iamTokenOptions = new TokenOptions(
Apikey: "{iam-apikey}"
);
service = new AssistantService("{versionDate}", iamTokenOptions);
service.SetEndpoint("{service-endpoint}");
}Or constructors accepted TokenOptions or username and password.
void Example()
{
service = new AssistantService("{tokenOptions}", "{versionDate}");
service2 = new DiscoveryService("{username}", "{password}", "{versionDate}");
}Now we use an Authenticator to authenticate the service. Available authentication schemes include IamAuthenticator, BasicAuthenticator, CloudPakForDataAuthenticator and BearerTokenAuthenticator
void Example()
{
IamAuthenticator authenticator = new IamAuthenticator(
apikey: "{apikey}"
);
var service = new AssistantService("{versionDate}", authenticator);
service.SetServiceUrl("{serviceUrl}");
}void Example()
{
BasicAuthenticator authenticator = new BasicAuthenticator(
username: "{username}",
password: "{password}"
);
var service = new AssistantService("{versionDate}", authenticator);
service.SetServiceUrl("{serviceUrl}");
}void Example()
{
BearerTokenAuthenticator authenticator = new BearerTokenAuthenticator(
bearerToken: "{bearerToken}"
);
var service = new AssistantService("{versionDate}", authenticator);
service.SetServiceUrl("{serviceUrl}");
}void Example()
{
CloudPakForDataAuthenticator authenticator = new CloudPakForDataAuthenticator(
url: "https://{cp4d_cluster_host}{:port}",
username: "{username}",
password: "{password}"
);
var service = new AssistantService("{version-date}", authenticator);
service.SetServiceUrl("{serviceUrl}");
var results = service.Message("{workspace-id}", "{message-request}");
}Constructors that did not take an Authenticator were removed.
You can supply credentials to your service using external ibm-credentials.env files.
AssistantService service = new AssistantService("{version-date}");
var listWorkspacesResult = service.ListWorkspaces();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 via SetEndpoint() method.
void Example()
{
TokenOptions iamTokenOptions = new TokenOptions(
apikey: "{iam-apikey}"
);
service = new AssistantService("{versionDate}", iamTokenOptions);
service.SetEndpoint("{service-endpoint}");
}Now we set the service url via the SetServiceUrl() method.
void Example()
{
IamAuthenticator authenticator = new IamAuthenticator(
apikey: "{apikey}"
);
var service = new AssistantService("{versionDate}", authenticator);
service.SetServiceUrl("{serviceUrl}");
}includeCountis no longer a parameter of theListWorkspaces()methodincludeCountis no longer a parameter of theListIntents()methodincludeCountis no longer a parameter of theListExamples()methodincludeCountis no longer a parameter of theListCounterexamples()methodincludeCountis no longer a parameter of theListEntities()methodincludeCountis no longer a parameter of theListValues()methodincludeCountis no longer a parameter of theListSynonyms()methodincludeCountis no longer a parameter of theListDialogNodes()methodvalueTypewas renamed totypein theCreateValue()methodnewValueTypewas renamed tonewTypein theUpdateValue()methodnodeTypewas renamed totypein theCreateDialogNode()methodnodeTypewas renamed totypein theCreateDialogNode()methodnewNodeTypewas renamed tonewTypein theUpdateDialogNode()methodValueTypeEnumValuewas renamed toTypeEnumValuein theCreateValuemodelValueTypewas renamed toTypein theCreateValuemodelNodeTypeEnumValuewas renamed toTypeEnumValuein theDialogNodemodelNodeTypewas renamed toTypein theDialogNodemodelActionTypeEnumValuewas renamed toTypeEnumValuein theDialogNodeActionmodelActionTypewas renamed toTypein theDialogNodeActionmodelSEARCH_SKILLconstant was added to theDialogNodeOutputGenericmodelQueryTypeEnumValueconstants were added to theDialogNodeOutputGenericmodelQueryTypeproperty was added to theDialogNodeOutputGenericmodelQueryproperty was added to theDialogNodeOutputGenericmodelFilterproperty was added to theDialogNodeOutputGenericmodelDiscoveryVersionproperty was added to theDialogNodeOutputGenericmodelOutputproperty type was converted fromDictionary<string, object>toDialogSuggestionOutputin theDialogSuggestionmodelLogMessagemodel no longer hasadditionalPropertiesDialogRuntimeResponseGenericwas renamed toRuntimeResponseGenericRuntimeEntitymodel no longer hasadditionalPropertiesRuntimeIntentmodel no longer hasadditionalPropertiesValueTypeEnumValuewas renamed toTypeEnumValuein theValuemodelValueTypewas renamed toTypein theValuemodel
ActionTypeEnumValuewas renamed toTypeEnumValuein theDialogNodeActionmodelActionTypewas renamed toTypein theDialogNodeActionmodelDialogRuntimeResponseGenericwas renamed toRuntimeResponseGeneric
ConvertToHtml()method does not require afilenameparameter
returnFieldswas renamed to_returnin theQuery()methodloggingOptOutwas renamed toxWatsonLoggingOptOutin theQuery()methodspellingSuggestionswas added to theQuery()methodcollectionIdsis no longer a parameter of theQuery()methodreturnFieldswas renamed to_returnin theQueryNotices()methodloggingOptOutwas renamed toxWatsonLoggingOptOutin theFederatedQuery()methodcollectionIdsis now required in theFederatedQuery()methodcollectionIdschanged position in theFederatedQuery()methodreturnFieldswas renamed to_returnin theFederatedQuery()methodreturnFieldswas renamed to_returnin theFederatedQueryNotices()methodEnrichmentNamewas renamed to_Enrichmentin theEnrichmentmodelFieldTypeEnumValuewas renamed toTypeEnumValuein theFieldmodelFieldTypewas renamed toTypein theFieldmodelFieldNamewas renamed to_Fieldin theFieldmodelTestConfigurationInEnvironment()method was removedQueryEntities()method was removedQueryRelations()method was removed
defaultModelswas renamed to_defaultin theListModels()methodTranslationOutputwas renamed to_Translationin theTranslationmodel
metadatawas renamed totrainingMetadatain theCreateClassifier()method
strictis no longer a parameter of theTrainAcousticModel()methodFinalResultswas renamed toFinalin theSpeakerLabelsResultmodelFinalResultswas renamed toFinalin theSpeechRecognitionResultmodel
DetectFaces()method was removedClassNamewas renamed to_Classin theClassResultmodelClassNamewas renamed to_Classin theModelClassmodel
- New service!