ConversationActions.Request.Builder

public final class ConversationActions.Request.Builder


Builder object to construct the Request object.

Summary

Public constructors

Constructs a builder.

Public methods

@NonNull ConversationActions.Request

Builds the Request object.

@NonNull ConversationActions.Request.Builder

Sets a set of extended data to the request.

@NonNull ConversationActions.Request.Builder

Sets the hints to help text classifier to generate actions.

@NonNull ConversationActions.Request.Builder
setMaxSuggestions(@IntRange(from = "-1") int maxSuggestions)

Sets the maximum number of suggestions you want.

@NonNull ConversationActions.Request.Builder

Sets the type config.

Public constructors

Builder

public Builder(@NonNull List<ConversationActions.Message> conversation)

Constructs a builder.

Parameters
@NonNull List<ConversationActions.Message> conversation

the conversation that the text classifier is going to generate actions for.

Public methods

build

public @NonNull ConversationActions.Request build()

Builds the Request object.

setExtras

public @NonNull ConversationActions.Request.Builder setExtras(@Nullable Bundle bundle)

Sets a set of extended data to the request.

setHints

public @NonNull ConversationActions.Request.Builder setHints(@Nullable List<String> hints)

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

public @NonNull ConversationActions.Request.Builder setMaxSuggestions(@IntRange(from = "-1") int maxSuggestions)

Sets the maximum number of suggestions you want. Value -1 means no restriction and this is the default.

setTypeConfig

public @NonNull ConversationActions.Request.Builder setTypeConfig(@Nullable TextClassifier.EntityConfig typeConfig)

Sets the type config.