public class Assistant extends WatsonService
defaultHeaders, JSON_MIME_PATTERN, JSON_PATCH_MIME_PATTERN, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
Assistant(java.lang.String versionDate)
Instantiates a new `Assistant`.
|
Assistant(java.lang.String versionDate,
IamOptions iamOptions)
Instantiates a new `Assistant` with IAM.
|
Assistant(java.lang.String versionDate,
java.lang.String username,
java.lang.String password)
Instantiates a new `Assistant` with username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<SessionResponse> |
createSession(CreateSessionOptions createSessionOptions)
Create a session.
|
ServiceCall<java.lang.Void> |
deleteSession(DeleteSessionOptions deleteSessionOptions)
Delete session.
|
ServiceCall<MessageResponse> |
message(MessageOptions messageOptions)
Send user input to assistant.
|
configureClient, configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isJsonMimeType, isJsonPatchMimeType, isTokenManagerSet, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, toString
public Assistant(java.lang.String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public Assistant(java.lang.String versionDate, java.lang.String username, java.lang.String password)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.username
- the usernamepassword
- the passwordpublic Assistant(java.lang.String versionDate, IamOptions iamOptions)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.iamOptions
- the options for authenticating through IAMpublic ServiceCall<SessionResponse> createSession(CreateSessionOptions createSessionOptions)
createSessionOptions
- the CreateSessionOptions
containing the options for the callServiceCall
with a response type of SessionResponse
public ServiceCall<java.lang.Void> deleteSession(DeleteSessionOptions deleteSessionOptions)
deleteSessionOptions
- the DeleteSessionOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<MessageResponse> message(MessageOptions messageOptions)
messageOptions
- the MessageOptions
containing the options for the callServiceCall
with a response type of MessageResponse