MLKitSmartReply 架構參考資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
TextMessage
class TextMessage : NSObject
單一即時通訊訊息,可用於智慧回覆功能的陣列元素輸入。
-
聲明
Swift
var text: String { get }
-
聲明
Swift
var timestamp: TimeInterval { get }
-
聲明
Swift
var userID: String { get }
-
聲明
Swift
var isLocalUser: Bool { get }
-
聲明
Swift
init(text: String, timestamp: TimeInterval, userID: String, isLocalUser: Bool)
參數
text
|
|
timestamp
|
訊息時間 (以秒為單位),根據 Unix 時間計算。
|
userID
|
|
isLocalUser
|
|
-
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-15 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-10-15 (世界標準時間)。"],[[["`TextMessage` objects represent individual chat messages with properties for text, timestamp, user ID, and local user status."],["These objects are primarily used as input for Smart Reply functionality."],["Each message is associated with sender information, content, and a timestamp indicating when it was sent."],["You can create a `TextMessage` instance using the designated initializer providing the necessary details."]]],["`TextMessage` represents a single chat message for Smart Reply input. It contains the `text` of the message, a `timestamp` indicating when it was sent, a `userID` identifying the sender, and a boolean `isLocalUser` flag to denote if the message is from the user for whom suggestions are being generated. Messages are created via `init(text:timestamp:userID:isLocalUser:)` method using message text, timestamp, sender id, and a bool.\n"]]