<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ### 3.2.16 燈謎猜猜 #### (1)功能說明 燈謎猜猜是一款有趣的益智游戲。游戲有三關,難度遞增。答對一題,就能拿到一盞花燈。每關10道題,拿到6盞以上(含6盞)花燈即可進入下一關。 #### (2)接口說明 請求方法 POST 請求地址 http://api.ruyi.ai/v1/message 請求參數說明 參數名 |參數類型 |是否必須 |參數說明 ---- |---- |---- |---- q |String |是 |自然語言表達,例如“燈謎猜猜”,"開始游戲"等 app_key| String |是 |應用開發者秘鑰,注冊開發者后臺賬號,建立虛擬助理后獲得 user_id |String |是 |用戶唯一標識,便于支持個性化語義解析。建議開發者使用 UUID 字符,且不同用戶必須用不同的 user_id,防止意圖串。 #### (3) 返回說明 返回參數說明 名稱| 類型 |說明 ---- |---- |---- | code| Integer |返回代碼 msg| String| 返回代碼描述 parameters| JSON Object |解析到的實體以及服務說明 action| String| 服務的接口名稱 name |String| 匹配的意圖名稱 result |JSON Object |接口返回內容 outputs |Array |服務輸出結果,微信端使用 type 類型為 wechat 開頭的內容;硬件端收到所有內容,依據需求解析使用 返回代碼說明 返回代碼| 錯誤類型| 說明 ---- |---- |---- | 0/200 |成功 |請求成功 400 |無效請求 |某些必需參數缺失或參數值錯誤,詳見msg字段 401 | 未授權 | 授權失敗,app_key缺失或錯誤 403 |請求被禁止 |有效請求,但服務拒絕響應,請聯系contact@ruyi.ai 408 |請求超時 | 請求響應超時,一般響應時間設置為2000ms以內 429 |短時間內大量訪問 |短時間內請求數過多 500 | 內部錯誤 |服務處理異常 503 | 服務不可用 | 服務異常或正在維護 #### (4)請求示例 請求范例 燈謎猜猜 開始 石榴 跳過 重復 退出 請求示例 (輸入正確詞語) http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=竹子 返回結果 ``` { code: 0, msg: "ok", result: { _text: "竹子", msg_id: "3589a168-f712-4033-8e39-bbdbdf78666a", intents: [{ parameters: { text: "竹子", service: "lanternRiddle" }, action: "玩猜燈謎", name: "玩猜燈謎", result: { code: 200, response: { code: 0, msg: "成功", result: { rank: "1", questionCount: "1", rightAnswerCountCurrentRound: "1", questionAndAnswer: { answer: "玉米", question: "一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)", id: 1749 }, currentDengMiAnswerCount: 0, gameContinue: true, lastAnswerIsTrue: "true" } }, text: "答對了,贊一個!送你1盞花燈。下一題:一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)", type: "dialog" }, outputs: [{ type: "wechat.text", property: { text: "答對了,真棒!送你1盞花燈。下一題:一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)" } }, { type: "dialog", property: { text: "答對了,好厲害!送你1盞花燈。下一題:一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)", emotion: "happy" } }, { type: "dingdang.display.directive", payload: { text: "答對了,真棒!送你1盞花燈。下一題:一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)", type: "Display.RenderTemplate", token: "dengmicaicaiplay", template: { type: "NewsBodyTemplate", textContent: { title: "", description: "一物生得真奇怪,腰里長出胡子來,拔掉胡子剝開看,露出牙齒一排排。 (打一植物)" }, backgroundImage: { contentDescription: "", source: { url: "http://image.ruyi.ai/dingdang/1108dingdang-猜燈謎.jpg" } }, backgroundAudio: { source: { url: "" } }, url: "" } } } ], score: "1.0", scoreColor: "c4", is_match: 1, skill_id: "e0a69301-6ab1-496d-b5ba-d743595e7d22", id: "e8be266a-0c2c-4ae6-a245-e4179229a434" }], meta_process_milliseconds: 264 } } ``` 請求示例 (跳過) http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=跳過 返回結果 ``` { code: 0, msg: "ok", result: { _text: "不知道", msg_id: "a56ba146-ec9a-45b8-8b4b-573ec8e4c2ee", intents: [{ parameters: { text: "", any1: "", jump: "1", service: "lanternRiddle" }, action: "跳過", name: "跳過", result: { code: 200, response: { code: 0, msg: "成功", result: { rank: "1", questionCount: "2", rightAnswerCountCurrentRound: "1", questionAndAnswer: { answer: "荷花", question: "一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", id: 1807 }, currentDengMiAnswerCount: 0, gameContinue: true, lastAnswerIsTrue: "false", lastAnswer: "玉米" } }, text: "正確答案是玉米。下一題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", type: "dialog" }, outputs: [{ type: "wechat.text", property: { text: "正確答案是玉米。下一題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)" } }, { type: "dialog", property: { text: "好的,已跳過。答案是玉米。下一題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", emotion: "positive" } }, { type: "dingdang.display.directive", payload: { text: "好的,已跳過。答案是玉米。下一題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", type: "Display.RenderTemplate", token: "dengmicaicaicidian", template: { type: "NewsBodyTemplate", textContent: { title: "", description: "一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)" }, backgroundImage: { contentDescription: "", source: { url: "http://image.ruyi.ai/dingdang/1108dingdang-猜燈謎.jpg" } }, backgroundAudio: { source: { url: "" } }, url: "" } } } ], score: "1.0", scoreColor: "c4", is_match: 1, skill_id: "e0a69301-6ab1-496d-b5ba-d743595e7d22", id: "44f0da7b-456c-408c-bd97-186606a783e8" }], meta_process_milliseconds: 334 } } ``` 請求示例 (重復) http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=重復 返回結果 ``` { code: 0, msg: "ok", result: { _text: "重復", msg_id: "f9cb705c-88b6-4e2b-8c91-91171cf84255", intents: [{ parameters: { service: "lanternRiddle" }, action: "猜燈謎-重復", name: "重復", result: { code: 200, response: { code: 0, msg: "成功", result: { rank: "1", questionCount: "2", rightAnswerCountCurrentRound: "1", questionAndAnswer: { answer: "荷花", question: "一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", id: 1807 }, currentDengMiAnswerCount: 0, gameContinue: true, lastAnswerIsTrue: "false", lastAnswer: "玉米", theFirstCharacter: "荷" } }, text: "請聽題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", type: "dialog" }, outputs: [{ type: "wechat.text", property: { text: "請聽題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)" } }, { type: "dialog", property: { text: "請聽題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", emotion: "calm" } }, { type: "dingdang.display.directive", payload: { text: "請聽題:一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", type: "Display.RenderTemplate", token: "dengmicaicairepeat", template: { type: "NewsBodyTemplate", textContent: { title: "", description: "一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)" }, backgroundImage: { contentDescription: "", source: { url: "http://image.ruyi.ai/dingdang/1108dingdang-猜燈謎.jpg" } }, backgroundAudio: { source: { url: "" } }, url: "" } } } ], score: "1.0", scoreColor: "c4", is_match: 1, skill_id: "e0a69301-6ab1-496d-b5ba-d743595e7d22", id: "bdfac779-ef8c-4b0b-9d12-b6ee9ca0434d" }], meta_process_milliseconds: 403 } } ``` 請求示例 (退出) http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=退出 返回結果 ``` { code: 0, msg: "ok", result: { _text: "退出", msg_id: "50921777-db85-48df-bdca-91666f38f659", intents: [{ parameters: { text: "1", 退出: "結束", service: "lanternRiddle" }, action: "玩猜燈謎", name: "退出如意技能", result: { code: 200, response: { code: 0, msg: "成功", result: { rank: "1", questionCount: "2", rightAnswerCountCurrentRound: "1", questionAndAnswer: { answer: "荷花", question: "一個小姑娘,生在水中央,身穿粉紅衫,坐在綠船上。(打一植物)", id: 1807 }, currentDengMiAnswerCount: "1", gameContinue: true, lastAnswerIsTrue: "false", lastAnswer: "玉米" } }, text: "你在燈謎猜猜的第一關拿到了1盞花燈,再接再厲哦", type: "dialog" }, outputs: [{ type: "wechat.text", property: { text: "你在燈謎猜猜的第一關拿到了1盞花燈,再接再厲哦" } }, { type: "dialog", property: { text: "你在燈謎猜猜的第一關拿到了1盞花燈,再接再厲哦", emotion: "calm" } }, { type: "dingdang.display.directive", payload: { text: "已為你退出技能。下次玩跟我說“猜燈謎”", type: "Display.RenderTemplate", token: "dengmicaicaiquit", template: { type: "NewsBodyTemplate", textContent: { title: "", description: "已為你退出技能。下次玩跟我說“猜燈謎”" }, backgroundImage: { contentDescription: "", source: { url: "http://image.ruyi.ai/dingdang/1108dingdang-猜燈謎.jpg" } }, backgroundAudio: { source: { url: "" } }, url: "" } } } ], score: "1.0", scoreColor: "c4", is_match: 1, skill_id: "e0a69301-6ab1-496d-b5ba-d743595e7d22", id: "75622406-817c-470f-8144-38ac49e4ae93" }], meta_process_milliseconds: 93 } } ``` 詳細參數說明 名稱 |類型| 說明 ---- |---- |---- | service| String| 服務名稱 lastAnswer| Boolean |判斷是否為正確答案,是則為 true question| String |當前問題內容 answer |String |當前答案 theFirstCharacter |String |提示答案第一個字 gameContinue |String |游戲是否繼續 answer |String |當前這一輪的答案 rank |String |第幾關 currentDengMiAnswerCount | Integer |當前問題回答次數 rightAnswerCountCurrentRound |Integer |回答正確數 questionCount |Integer |所回答的問題總數 指令清單 指令名稱| 范例 ---- |---- 喚醒 |燈謎猜猜 開始游戲| 開始 玩游戲| 竹子 重復| 沒聽清 跳過 |跳過 退出| 不玩了
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看