代理程式會從 Google Pub/Sub 訂閱項目接收「訊息」物件的「資料」欄位,找到 UserMessage。「data」欄位是採用 Base64 編碼的字串,代理程式必須解碼才能符合 UserMessage 結構。
JSON 表示法
{"senderPhoneNumber": string,"messageId": string,"sendTime": string,"agentId": string,// Union field content can be only one of the following:"text": string,"userFile": {object (UserFile)},"location": {object (LatLng)},"suggestionResponse": {object (SuggestionResponse)}// End of list of possible types for union field content.}
[[["容易理解","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"]],["上次更新時間:2025-04-27 (世界標準時間)。"],[[["UserMessage data is received by the agent in a base64-encoded string within the \"data\" field of the \"message\" object, which must be decoded."],["The UserMessage includes fields such as `senderPhoneNumber`, `messageId`, `sendTime`, and `agentId`, providing details about the sender and message metadata."],["The `content` field of a UserMessage can represent various types of user input, including `text`, `userFile`, `location`, or `suggestionResponse`."],["`sendTime` follows RFC 3339 format, which supports fractional digits and time offsets, ensuring precise time information."],["The `senderPhoneNumber` is the user's number in E.164 format, and `messageId` is a unique identifier assigned to the message by the user's RCS client."]]],[]]