google_mlkit_smart_reply 0.3.0 copy "google_mlkit_smart_reply: ^0.3.0" to clipboard
google_mlkit_smart_reply: ^0.3.0 copied to clipboard

outdated

A Flutter plugin to use Google's ML Kit Smart Reply API to automatically generate relevant replies to messages.

Google's ML Kit Smart Reply for Flutter #

Pub Version

A Flutter plugin to use Google's ML Kit Smart Reply API to automatically generate relevant replies to messages.

Getting Started #

Before you get started read about the requirements and known issues of this plugin here.

Usage #

Smart Reply #

Create an instance of SmartReply

final smartReply = SmartReply();

Add messages to the conversation

// For local user.
smartReply.addMessageToConversationFromLocalUser(message, timestamp);

// For remote user. 
smartReply.addMessageToConversationFromRemoteUser(message, timestamp, userId);

Generate replies

final response = await smartReply.suggestReplies();

for (final suggestion in response.suggestions) {
  print('suggestion: $suggestion');
}

Release resources with close()

smartReply.close();

Example app #

Find the example app here.

Contributing #

Contributions are welcome. In case of any problems look at existing issues, if you cannot find anything related to your problem then open an issue. Create an issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.

14
likes
0
pub points
91%
popularity

Publisher

verified publisherflutter-ml.dev

A Flutter plugin to use Google's ML Kit Smart Reply API to automatically generate relevant replies to messages.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, google_mlkit_commons

More

Packages that depend on google_mlkit_smart_reply