MLKitSmartReply Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MLKSmartReply
@interface MLKSmartReply : NSObject
An object that suggests smart replies for given input text.
-
Gets a smart reply instance that provides suggested replies for input text. This method is thread
safe.
Declaration
Objective-C
+ (nonnull MLKSmartReply *)smartReply;
Return Value
A SmartReply
instance that provides suggested replies.
-
Suggests replies in the context of a chat conversation.
Parameters
messages
|
The sequence of chat messages to generate a suggestion for.
|
completion
|
Handler to call back on the main queue with the suggestion result or error.
|
-
Declaration
Objective-C
- (nonnull instancetype)init;
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-07-10 UTC.
[null,null,["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eMLKSmartReply\u003c/code\u003e suggests smart replies for given input text within a chat conversation.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a method to get a \u003ccode\u003eSmartReply\u003c/code\u003e instance that is thread-safe.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esuggestRepliesForMessages:completion:\u003c/code\u003e method generates reply suggestions based on a sequence of chat messages and returns the result or error through a completion handler.\u003c/p\u003e\n"],["\u003cp\u003eDirect initialization of \u003ccode\u003eMLKSmartReply\u003c/code\u003e is unavailable.\u003c/p\u003e\n"]]],[],null,["# MLKitSmartReply Framework Reference\n\nMLKSmartReply\n=============\n\n\n @interface MLKSmartReply : NSObject\n\nAn object that suggests smart replies for given input text.\n- `\n ``\n ``\n `\n\n ### [+smartReply](#/c:objc(cs)MLKSmartReply(cm)smartReply)\n\n `\n ` \n Gets a smart reply instance that provides suggested replies for input text. This method is thread\n safe. \n\n #### Declaration\n\n Objective-C \n\n + (nonnull MLKSmartReply *)smartReply;\n\n #### Return Value\n\n A `SmartReply` instance that provides suggested replies.\n- `\n ``\n ``\n `\n\n ### [-suggestRepliesForMessages:completion:](#/c:objc(cs)MLKSmartReply(im)suggestRepliesForMessages:completion:)\n\n `\n ` \n Suggests replies in the context of a chat conversation. \n\n #### Declaration\n\n Objective-C \n\n - (void)suggestRepliesForMessages:(nonnull NSArray\u003c../Classes/MLKTextMessage.html *\u003e *)messages\n completion:(nonnull ../Type-Definitions.html#/c:MLKSmartReply.h@T@MLKSmartReplyCallback)completion;\n\n #### Parameters\n\n |--------------------|-----------------------------------------------------------------------------|\n | ` `*messages*` ` | The sequence of chat messages to generate a suggestion for. |\n | ` `*completion*` ` | Handler to call back on the main queue with the suggestion result or error. |\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)MLKSmartReply(im)init)\n\n `\n ` \n Unavailable. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]