public class DialogflowV2DialogEnginePlugin extends java.lang.Object implements Plugin, NaturalLanguagePlugin
| Constructor and Description |
|---|
DialogflowV2DialogEnginePlugin(com.speechstorm.fish.runtime.VuiContext vuiContext_p) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearSlot(java.lang.String sName_p)
Clears a slot _internally_ in the DialogEngine object.
|
java.lang.String |
getCurrentIntent()
Returns null if there is no intent yet.
|
com.fasterxml.jackson.databind.JsonNode |
getLastResponse() |
java.lang.String |
getName() |
java.lang.String |
getNextPrompt() |
java.util.Map<java.lang.String,java.util.Map<com.speechstorm.fish.ai.dialogcommons.SlotValue,java.lang.Float>> |
getSlots()
Returns a read-only map where each key is the name of a slot, and the
content is a mapping of values to confidence scores (0.0-1.0).
|
boolean |
isCompleted()
Returns true if the intent and all required slots have been captured.
|
boolean |
isDeveloperModeAvailable()
Checks the server settings to see if developer mode is available.
|
boolean |
isLiveAgentHandoffRequested()
Checks if the live agent handoff flag is set to true in the response from
the DialogEngine.
|
boolean |
isRecognitionFailure() |
boolean |
isSlotFailure()
Enables the runtime to check if the NL engine has failed in filling a slot value.
|
boolean |
processUserInput(com.speechstorm.fish.runtime.RecognitionResults recognitionResults_p) |
boolean |
processUserInput(java.lang.String sInput_p) |
void |
setDialogEngine(com.speechstorm.fish.ai.dialogflow.DialogflowV2DialogEngine engine_p) |
void |
startSession(java.lang.String sAuthJson_p,
java.lang.Boolean bPassContext_p) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAvailablepublic DialogflowV2DialogEnginePlugin(com.speechstorm.fish.runtime.VuiContext vuiContext_p)
public com.fasterxml.jackson.databind.JsonNode getLastResponse()
public java.lang.String getName()
public void startSession(java.lang.String sAuthJson_p,
java.lang.Boolean bPassContext_p)
throws java.lang.Exception
java.lang.Exceptionpublic boolean processUserInput(com.speechstorm.fish.runtime.RecognitionResults recognitionResults_p)
throws java.lang.Exception
processUserInput in interface NaturalLanguagePluginjava.lang.Exceptionpublic boolean processUserInput(java.lang.String sInput_p)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getCurrentIntent()
getCurrentIntent in interface NaturalLanguagePluginpublic java.lang.String getNextPrompt()
getNextPrompt in interface NaturalLanguagePluginpublic boolean isCompleted()
NaturalLanguagePluginisCompleted in interface NaturalLanguagePluginpublic java.util.Map<java.lang.String,java.util.Map<com.speechstorm.fish.ai.dialogcommons.SlotValue,java.lang.Float>> getSlots()
{
"Vegetable" : {
"Aubergine" : 0.7,
"Carrot" : 0.13
},
"Fruit" : {
"Tomato" : 0.8
}
}
getSlots in interface NaturalLanguagePluginpublic void clearSlot(java.lang.String sName_p)
clearSlot in interface NaturalLanguagePluginpublic boolean isLiveAgentHandoffRequested()
isLiveAgentHandoffRequested in interface NaturalLanguagePluginpublic void setDialogEngine(com.speechstorm.fish.ai.dialogflow.DialogflowV2DialogEngine engine_p)
public boolean isSlotFailure()
NaturalLanguagePluginisSlotFailure in interface NaturalLanguagePluginpublic boolean isRecognitionFailure()
isRecognitionFailure in interface NaturalLanguagePluginpublic boolean isDeveloperModeAvailable()