MLKitSmartReply 框架参考
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
MLKSmartReply
@interface MLKSmartReply : NSObject
为给定输入文本提供智能回复建议的对象。
-
获取为输入文本提供建议回复的智能回复实例。此方法为线程
安全。
声明
Objective-C
+ (nonnull MLKSmartReply *)smartReply;
返回值
提供建议的回复的 SmartReply
实例。
-
-
声明
Objective-C
- (nonnull instancetype)init;
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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;"]]