ข้อมูลอ้างอิงเฟรมเวิร์ก MLKitSmartResponse
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
MLKSmartReply
@interface MLKSmartReply : NSObject
ออบเจ็กต์ที่แนะนำสมาร์ทรีพลายสำหรับข้อความอินพุตที่ระบุ
-
รับอินสแตนซ์สมาร์ทรีพลายที่มีการตอบกลับที่แนะนำสำหรับข้อความอินพุต วิธีนี้เป็นเทรด
ได้อย่างปลอดภัย
คำประกาศ
Objective-C
+ (nonnull MLKSmartReply *)smartReply;
ผลลัพธ์
อินสแตนซ์ SmartReply
ที่มีการตอบกลับที่แนะนำ
-
แนะนำการตอบกลับในบริบทของการสนทนาในแชท
พารามิเตอร์
messages
|
ลำดับของข้อความแชทที่จะสร้างคำแนะนำ
|
completion
|
เครื่องจัดการที่จะโทรกลับในคิวหลักพร้อมด้วยผลลัพธ์ของคำแนะนำหรือข้อผิดพลาด
|
-
คำประกาศ
Objective-C
- (nonnull instancetype)init;
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 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;"]]