public static class ConversationState.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ConversationState |
build()
Turn the current builder into an immutable
ConversationState. |
ConversationState.Builder |
withAction(String appAction,
Map<String,Slot> args)
Include an app action and associated slots in the conversation
state.
|
ConversationState.Builder |
withError(String errorMessage)
Include an error message in the conversation state.
|
ConversationState.Builder |
withNode(String node)
Include a conversation node in
<frame>.<node> representation
in the conversation state. |
ConversationState.Builder |
withPrompt(Prompt prompt)
Include a system prompt in the conversation state.
|
public ConversationState.Builder withNode(String node)
<frame>.<node> representation
in the conversation state.node - The node represented by the state.public ConversationState.Builder withAction(String appAction, Map<String,Slot> args)
appAction - The action represented by the state.args - The slots accompanying the action. These can be
thought of as arguments for the app action.public ConversationState.Builder withPrompt(Prompt prompt)
prompt - The system promptpublic ConversationState.Builder withError(String errorMessage)
errorMessage - The error message.public ConversationState build()
ConversationState.Copyright © 2021. All rights reserved.