public class DialogService extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_ID |
static String |
CONVERSATION_ID |
static String |
DATE_FROM |
static String |
DATE_TO |
static String |
DIALOG_ID |
static String |
INPUT |
static String |
LIMIT |
static String |
NAME_VALUES |
static String |
OFFSET |
| Constructor and Description |
|---|
DialogService()
Instantiates a new Dialog service with the default url
|
| Modifier and Type | Method and Description |
|---|---|
Conversation |
converse(Map<String,Object> params)
Starts or continue conversations.
|
Conversation |
createConversation(String dialogId)
Starts or continue conversations.
|
Dialog |
createDialog(String name,
File dialogFile)
Creates a dialog.
|
void |
deleteDialog(String dialogId)
Deletes a dialog.
|
List<DialogContent> |
getContent(String dialogId)
Gets content for nodes.
|
List<ConversationData> |
getConversationData(Map<String,Object> params)
Returns chat session data dump for a given date rage.
|
List<Dialog> |
getDialogs()
Retrieves the list of Dialogs for the user.
|
List<NameValue> |
getProfile(String dialogId,
Integer clientId)
Returns a list of name-value pars associated with a client id.
|
String |
toString() |
Dialog |
updateDialog(String dialogId,
File dialogFile)
Updates a dialog.
|
void |
updateProfile(String dialogId,
Integer clientId,
List<NameValue> nameValues)
Updates a dialog profile with a list of
NaveValue properties. |
execute, executeWithoutResponse, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getGson, getHttpClient, getThreadSafeClient, setApiKey, setEndPoint, setUsernameAndPasswordpublic static final String CLIENT_ID
public static final String CONVERSATION_ID
public static final String DIALOG_ID
public static final String INPUT
public static final String DATE_FROM
public static final String DATE_TO
public static final String LIMIT
public static final String OFFSET
public static final String NAME_VALUES
public DialogService()
public Conversation converse(Map<String,Object> params)
dialog_id - Dialog identifierclient_id - A client id number generated by the Dialog service. If not
specified a new client id will be issued.conversation_id - the conversation id. If not specified, a new conversation will
be started.input - the user input messageConversation with the responsepublic Conversation createConversation(String dialogId)
dialogId - the dialog identifierConversationpublic Dialog createDialog(String name, File dialogFile)
name - The dialog namedialogFile - The dialog file created by using the Dialog service Applet.Dialogpublic void deleteDialog(String dialogId)
dialogId - The dialog identifierDialogServicepublic List<DialogContent> getContent(String dialogId)
dialogId - the dialog identifierDialogContent for nodespublic List<Dialog> getDialogs()
Dialog listpublic List<NameValue> getProfile(String dialogId, Integer clientId)
dialogId - The dialog identifierclientId - the client idNameValuepublic List<ConversationData> getConversationData(Map<String,Object> params)
dialog_id - the dialog identifierdate_from - Date from where to start the data dumpdate_to - Date to where to end the data dumpoffset - the offset from where to return conversationslimit - the number of conversations to returnConversationDatapublic String toString()
toString in class WatsonServicepublic Dialog updateDialog(String dialogId, File dialogFile)
dialogId - The dialog identifierdialogFile - The dialog fileDialogpublic void updateProfile(String dialogId, Integer clientId, List<NameValue> nameValues)
NaveValue properties.
If clientId is not specified a new clientId is generated.
Profile variables are case sensitive.dialogId - The dialog identifierclientId - the client identifiernameValues - The name value list to updateDialogCopyright © 2015. All rights reserved.