SmartReply

  • SmartReply is the entry point for generating smart replies to text input using ML Kit.

  • It provides a getClient() method to create a SmartReplyGenerator instance.

  • SmartReplyGenerator suggests replies based on provided conversation history.

  • Developers need to call SmartReplyGenerator.close() to release resources when finished.

public class SmartReply extends Object

Entry point to get a SmartReplyGenerator that suggests replies for a given text input.

A SmartReplyGenerator is created via getClient().

Example:

 SmartReplyGenerator smartReplyGenerator = SmartReply.getClient(); 

Public Method Summary

static SmartReplyGenerator
getClient(SmartReplyGeneratorOptions options)
Returns a new SmartReplyGenerator that suggests replies for a given text input.
static SmartReplyGenerator
getClient()
Returns a new SmartReplyGenerator that suggests replies for a given text input.

Inherited Method Summary

Public Methods

public static SmartReplyGenerator getClient (SmartReplyGeneratorOptions options)

Returns a new SmartReplyGenerator that suggests replies for a given text input.

public static SmartReplyGenerator getClient ()

Returns a new SmartReplyGenerator that suggests replies for a given text input.

To release the resources associated with an SmartReplyGenerator, you need to ensure that SmartReplyGenerator.close() is called on the resulting SmartReplyGenerator instance once it will no longer be used.