@Beta public class RecastDialog extends Object
Be aware that this class is in Beta (as indicated by the annotation) and therefore subject to breaking changes.
Constructor and Description |
---|
RecastDialog(String token)
Initiates a Recast dialog object with URI="https://api.recast.ai/build/v1/dialog" and the given token.
|
RecastDialog(String token,
String uri)
Initiates a Recast dialog object with URI given by the user.
|
Modifier and Type | Method and Description |
---|---|
DialogResponse |
sendInteraction(DialogResponseWrapper dialogResponseWrapper)
Sends a message and awaits a response from the bot, allows more freedom for memory settings
|
DialogResponse |
sendInteraction(String message,
String conversationId)
Sends a message and awaits a response from the bot
|
public RecastDialog(String token)
token
- the token to be used.@Nullable public DialogResponse sendInteraction(String message, String conversationId) throws ShouldNotHappenException
message
- a single message to be sentconversationId
- the conversation the message should be send toShouldNotHappenException
- if an error occurs@Nullable public DialogResponse sendInteraction(DialogResponseWrapper dialogResponseWrapper) throws ShouldNotHappenException
dialogResponseWrapper
- a simple response as set by the userShouldNotHappenException
- if an error occursCopyright © 2020 SAP SE. All rights reserved.