Builder
class Builder
kotlin.Any | |
↳ | androidx.textclassifier.ConversationActions.Request.Builder |
Builder object to construct the Request
object.
Summary
Public constructors | |
---|---|
<init>(@NonNull conversation: MutableList<ConversationActions.Message!>) Constructs a builder. |
Public methods | |
---|---|
ConversationActions.Request |
build() Builds the |
ConversationActions.Request.Builder |
Sets a set of extended data to the request. |
ConversationActions.Request.Builder |
setHints(@Nullable hints: MutableList<String!>?) Sets the hints to help text classifier to generate actions. |
ConversationActions.Request.Builder |
setMaxSuggestions(@IntRange(-1) maxSuggestions: Int) Sets the maximum number of suggestions you want. |
ConversationActions.Request.Builder |
setTypeConfig(@Nullable typeConfig: TextClassifier.EntityConfig?) Sets the type config. |
Public constructors
<init>
Builder(@NonNull conversation: MutableList<ConversationActions.Message!>)
Constructs a builder.
Parameters | |
---|---|
conversation |
MutableList<ConversationActions.Message!>: the conversation that the text classifier is going to generate actions for. |
Public methods
setExtras
@NonNull fun setExtras(@Nullable bundle: Bundle?): ConversationActions.Request.Builder
Sets a set of extended data to the request.
setHints
@NonNull fun setHints(@Nullable hints: MutableList<String!>?): ConversationActions.Request.Builder
Sets the hints to help text classifier to generate actions. It could be used to help text classifier to infer what types of actions the caller may be interested in.
setMaxSuggestions
@NonNull fun setMaxSuggestions(@IntRange(-1) maxSuggestions: Int): ConversationActions.Request.Builder
Sets the maximum number of suggestions you want. Value -1 means no restriction and this is the default.
setTypeConfig
@NonNull fun setTypeConfig(@Nullable typeConfig: TextClassifier.EntityConfig?): ConversationActions.Request.Builder
Sets the type config.