Dokumentacja platformy MLKitSmartReply
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
MLKSmartReply
@interface MLKSmartReply : NSObject
Obiekt sugerujący inteligentne odpowiedzi na dany tekst.
-
Pobiera instancję inteligentnej odpowiedzi, która udostępnia sugerowane odpowiedzi na wpisany tekst. Ta metoda jest wątkowa
bezpieczeństwa.
Deklaracja
Objective-C
+ (nonnull MLKSmartReply *)smartReply;
Zwracana wartość
Instancja SmartReply
, która udostępnia sugerowane odpowiedzi.
-
Sugeruje odpowiedzi w kontekście rozmowy na czacie.
Parametry
messages
|
Sekwencja wiadomości na czacie, dla których zostaną wygenerowane sugestie.
|
completion
|
Moduł obsługi, który pozwala oddzwonić do głównej kolejki z wynikiem sugestii lub błędem.
|
-
Deklaracja
Objective-C
- (nonnull instancetype)init;
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 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;"]]