SmartReplySuggestionResult
Stay organized with collections
Save and categorize content based on your preferences.
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()
|
Constants
public static final int
STATUS_NOT_SUPPORTED_LANGUAGE
The Smart Reply model currently doesn't support the language used in the
conversation.
Constant Value: 1
public static final int
STATUS_NO_REPLY
The Smart Reply model cannot determine an applicable reply.
Constant Value: 2
public static final int
STATUS_SUCCESS
The Smart Reply model successfully generated (1-3) replies.
Constant Value: 0
Public Methods
public int getStatus ()
Gets the status of the Smart Reply suggestion result.
Possible values are:
A list of the suggested responses sorted by confidence (highest to lowest).
public String
toString ()
A textual description of the suggested replies, including their texts.
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 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eSmartReplySuggestionResult\u003c/code\u003e provides suggested replies generated by the Smart Reply model based on a given text.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a status indicating the success of the suggestion generation (success, unsupported language, or no reply).\u003c/p\u003e\n"],["\u003cp\u003eIf successful, it offers a list of \u003ccode\u003eSmartReplySuggestion\u003c/code\u003e objects, sorted by confidence level.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access the status and suggestions using \u003ccode\u003egetStatus()\u003c/code\u003e and \u003ccode\u003egetSuggestions()\u003c/code\u003e methods, respectively.\u003c/p\u003e\n"]]],["`SmartReplySuggestionResult` provides results from the `SmartReplyGenerator`. Key actions include: `getStatus()` to determine if suggestions were successful, language is supported, or no reply could be determined (constants: `STATUS_SUCCESS`, `STATUS_NOT_SUPPORTED_LANGUAGE`, `STATUS_NO_REPLY`). `getSuggestions()` returns a list of suggested replies ordered by confidence. `toString()` offers a textual description of the suggestions. The status can inform about the generated suggestions, if any.\n"],null,["public class **SmartReplySuggestionResult** extends [Object](https://developer.android.com/reference/java/lang/Object.html) \nThe suggested result from the [SmartReplyGenerator](/android/reference/com/google/mlkit/nl/smartreply/SmartReplyGenerator)\nfor the given text. It contains a list of [SmartReplySuggestion](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestion)s. \n\nNested Class Summary\n\n|------------|---|---|--------------------------------------------------------------|\n| @interface | [SmartReplySuggestionResult.Status](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult.Status) || A possible status code for a Smart Reply suggestion attempt. |\n\nConstant Summary\n\n|-----|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| int | [STATUS_NOT_SUPPORTED_LANGUAGE](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_NOT_SUPPORTED_LANGUAGE) | The Smart Reply model currently doesn't support the language used in the conversation. |\n| int | [STATUS_NO_REPLY](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_NO_REPLY) | The Smart Reply model cannot determine an applicable reply. |\n| int | [STATUS_SUCCESS](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_SUCCESS) | The Smart Reply model successfully generated (1-3) replies. |\n\nPublic Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [getStatus](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#getStatus())() Gets the status of the Smart Reply suggestion result. |\n| [List](https://developer.android.com/reference/java/util/List.html)\\\u003c[SmartReplySuggestion](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestion)\\\u003e | [getSuggestions](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#getSuggestions())() A list of the suggested responses sorted by confidence (highest to lowest). |\n| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#toString())() A textual description of the suggested replies, including their texts. |\n\nInherited Method Summary \nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://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\nConstants \n\npublic static final int\n**STATUS_NOT_SUPPORTED_LANGUAGE** \nThe Smart Reply model currently doesn't support the language used in the\nconversation. \nConstant Value: 1 \n\npublic static final int\n**STATUS_NO_REPLY** \nThe Smart Reply model cannot determine an applicable reply. \nConstant Value: 2 \n\npublic static final int\n**STATUS_SUCCESS** \nThe Smart Reply model successfully generated (1-3) replies. \nConstant Value: 0\n\nPublic Methods \n\npublic int **getStatus** () \nGets the status of the Smart Reply suggestion result.\n\nPossible values are:\n\n- [STATUS_SUCCESS](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_SUCCESS) when [getSuggestions()](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#getSuggestions()) will successfully provide up to three meaningful suggestions.\n- [STATUS_NOT_SUPPORTED_LANGUAGE](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_NOT_SUPPORTED_LANGUAGE) when the language used in the conversation is not supported by the Smart Reply model.\n- [STATUS_NO_REPLY](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestionResult#STATUS_NO_REPLY) when the Smart Reply model cannot determine an applicable reply. \n\npublic [List](https://developer.android.com/reference/java/util/List.html)\\\u003c[SmartReplySuggestion](/android/reference/com/google/mlkit/nl/smartreply/SmartReplySuggestion)\\\u003e\n**getSuggestions** () \nA list of the suggested responses sorted by confidence (highest to lowest). \n\npublic [String](https://developer.android.com/reference/java/lang/String.html)\n**toString** () \nA textual description of the suggested replies, including their texts."]]