FirebaseSmartReply
Stay organized with collections
Save and categorize content based on your preferences.
This class is deprecated.
The standalone ML Kit SDK replaces this API. For more information, refer to the migration guide.
Entry class for Firebase Smart Reply, which automatically suggests meaningful replies to a
user input message.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
From interface java.io.Closeable
From interface java.lang.AutoCloseable
Public Methods
public void close ()
Closes the underlying resources including models used for reply inference.
Returns suggested meaningful replies to a user input message.
Right now, 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 chronological order. Internally, SmartReply considers the last
N messages (N changes with model) to generate the best reply suggestions. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-08-14 UTC.
[null,null,["Last updated 2020-08-14 UTC."],[],[],null,["# FirebaseSmartReply\n\npublic class **FirebaseSmartReply** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Closeable](//developer.android.com/reference/java/io/Closeable.html) \n**This class is deprecated.** \n\nThe standalone ML Kit SDK replaces this API. For more information, refer to the [migration guide](//developers.google.com/ml-kit/migration).\n\nEntry class for Firebase Smart Reply, which automatically suggests meaningful replies to a\nuser input message. \n\n### Public Method Summary\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void | [close](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseSmartReply#close())() Closes the underlying resources including models used for reply inference. |\n| [Task](//developers.google.com/android/reference/com/google/android/gms/tasks/Task.html)\\\u003c[SmartReplySuggestionResult](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/SmartReplySuggestionResult)\\\u003e | [suggestReplies](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseSmartReply#suggestReplies(java.util.List\u003ccom.google.firebase.ml.naturallanguage.smartreply.FirebaseTextMessage\u003e))([List](//developer.android.com/reference/java/util/List.html)\\\u003c[FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage)\\\u003e textMessages) Returns suggested meaningful replies to a user input message. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface java.io.Closeable \n\n|---------------|---------|\n| abstract void | close() |\n\nFrom interface java.lang.AutoCloseable \n\n|---------------|---------|\n| abstract void | close() |\n\nPublic Methods\n--------------\n\n#### public void **close** ()\n\nCloses the underlying resources including models used for reply inference. \n\n##### Throws\n\n| [IOException](//developer.android.com/reference/java/io/IOException.html) | |\n|---------------------------------------------------------------------------|---|\n\n#### public [Task](//developers.google.com/android/reference/com/google/android/gms/tasks/Task.html)\\\u003c[SmartReplySuggestionResult](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/SmartReplySuggestionResult)\\\u003e\n**suggestReplies** ([List](//developer.android.com/reference/java/util/List.html)\\\u003c[FirebaseTextMessage](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseTextMessage)\\\u003e textMessages)\n\nReturns suggested meaningful replies to a user input message.\n\nRight now, English is the only supported language. \n\n##### Parameters\n\n| 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 chronological order. Internally, SmartReply considers the last N messages (N changes with model) to generate the best reply suggestions. |\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A [Task](//developers.google.com/android/reference/com/google/android/gms/tasks/Task.html) that asynchronously returns a [SmartReplySuggestionResult](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/SmartReplySuggestionResult) which contains a list of [SmartReplySuggestion](/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/SmartReplySuggestion)s. All the replies are sorted by an internal confidence value (highest to lowest)."]]