AI-generated Key Takeaways
-
The
SmartReplyGenerator
is a client for generating smart replies to user input messages. -
It uses the last 10 messages in a conversation to generate reply suggestions in English.
-
You can get an instance of it using
SmartReply.getClient()
. -
It provides a
suggestReplies
method that takes a list of messages and returns aSmartReplySuggestionResult
. -
The
close()
method should be called to release resources when the generator is no longer needed.
A SmartReply
client for suggesting meaningful replies to a user input message.
A SmartReplyGenerator
is created via SmartReply.getClient()
.
Example:
SmartReplyGenerator smartReplyGenerator = SmartReply.getClient();
Public Method Summary
abstract void |
close()
Closes the underlying resources including models used for reply inference.
|
abstract Task<SmartReplySuggestionResult> |
suggestReplies(List<TextMessage>
textMessages)
Returns suggested meaningful replies to a text message.
|
Inherited Method Summary
Public Methods
public abstract void close ()
Closes the underlying resources including models used for reply inference.
public abstract Task<SmartReplySuggestionResult> suggestReplies (List<TextMessage> textMessages)
Returns suggested meaningful replies to a text message.
Currently, English is the only supported language.
Parameters
textMessages |
a list of messages from which the API generates smart replies.
The messages list should contain most recent conversation context for all users participating in the conversation in ascending chronological order (i.e. from oldest to newest). Internally, SmartReply considers the last 10 messages to generate reply suggestions. |
---|
Returns
- a
Task
that asynchronously returns aSmartReplySuggestionResult
which contains a list ofSmartReplySuggestion
s. All the replies are sorted by an internal confidence value (highest to lowest).