MLKitSmartReply Framework Reference

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.

    Declaration

    Objective-C

    - (void)suggestRepliesForMessages:(nonnull NSArray<MLKTextMessage *> *)messages
                           completion:(nonnull MLKSmartReplyCallback)completion;

    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.

  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;