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}");
}
includeCount
is no longer a parameter of theListWorkspaces()
methodincludeCount
is no longer a parameter of theListIntents()
methodincludeCount
is no longer a parameter of theListExamples()
methodincludeCount
is no longer a parameter of theListCounterexamples()
methodincludeCount
is no longer a parameter of theListEntities()
methodincludeCount
is no longer a parameter of theListValues()
methodincludeCount
is no longer a parameter of theListSynonyms()
methodincludeCount
is no longer a parameter of theListDialogNodes()
methodvalueType
was renamed totype
in theCreateValue()
methodnewValueType
was renamed tonewType
in theUpdateValue()
methodnodeType
was renamed totype
in theCreateDialogNode()
methodnodeType
was renamed totype
in theCreateDialogNode()
methodnewNodeType
was renamed tonewType
in theUpdateDialogNode()
methodValueTypeEnumValue
was renamed toTypeEnumValue
in theCreateValue
modelValueType
was renamed toType
in theCreateValue
modelNodeTypeEnumValue
was renamed toTypeEnumValue
in theDialogNode
modelNodeType
was renamed toType
in theDialogNode
modelActionTypeEnumValue
was renamed toTypeEnumValue
in theDialogNodeAction
modelActionType
was renamed toType
in theDialogNodeAction
modelSEARCH_SKILL
constant was added to theDialogNodeOutputGeneric
modelQueryTypeEnumValue
constants were added to theDialogNodeOutputGeneric
modelQueryType
property was added to theDialogNodeOutputGeneric
modelQuery
property was added to theDialogNodeOutputGeneric
modelFilter
property was added to theDialogNodeOutputGeneric
modelDiscoveryVersion
property was added to theDialogNodeOutputGeneric
modelOutput
property type was converted fromDictionary<string, object>
toDialogSuggestionOutput
in theDialogSuggestion
modelLogMessage
model no longer hasadditionalProperties
DialogRuntimeResponseGeneric
was renamed toRuntimeResponseGeneric
RuntimeEntity
model no longer hasadditionalProperties
RuntimeIntent
model no longer hasadditionalProperties
ValueTypeEnumValue
was renamed toTypeEnumValue
in theValue
modelValueType
was renamed toType
in theValue
model
ActionTypeEnumValue
was renamed toTypeEnumValue
in theDialogNodeAction
modelActionType
was renamed toType
in theDialogNodeAction
modelDialogRuntimeResponseGeneric
was renamed toRuntimeResponseGeneric
ConvertToHtml()
method does not require afilename
parameter
returnFields
was renamed to_return
in theQuery()
methodloggingOptOut
was renamed toxWatsonLoggingOptOut
in theQuery()
methodspellingSuggestions
was added to theQuery()
methodcollectionIds
is no longer a parameter of theQuery()
methodreturnFields
was renamed to_return
in theQueryNotices()
methodloggingOptOut
was renamed toxWatsonLoggingOptOut
in theFederatedQuery()
methodcollectionIds
is now required in theFederatedQuery()
methodcollectionIds
changed position in theFederatedQuery()
methodreturnFields
was renamed to_return
in theFederatedQuery()
methodreturnFields
was renamed to_return
in theFederatedQueryNotices()
methodEnrichmentName
was renamed to_Enrichment
in theEnrichment
modelFieldTypeEnumValue
was renamed toTypeEnumValue
in theField
modelFieldType
was renamed toType
in theField
modelFieldName
was renamed to_Field
in theField
modelTestConfigurationInEnvironment()
method was removedQueryEntities()
method was removedQueryRelations()
method was removed
defaultModels
was renamed to_default
in theListModels()
methodTranslationOutput
was renamed to_Translation
in theTranslation
model
metadata
was renamed totrainingMetadata
in theCreateClassifier()
method
strict
is no longer a parameter of theTrainAcousticModel()
methodFinalResults
was renamed toFinal
in theSpeakerLabelsResult
modelFinalResults
was renamed toFinal
in theSpeechRecognitionResult
model
DetectFaces()
method was removedClassName
was renamed to_Class
in theClassResult
modelClassName
was renamed to_Class
in theModelClass
model
- New service!