<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.14 我愛猜歌名 #### (1)功能說明 一款欲罷不能的猜歌名游戲,歌曲種類豐富,玩法上手簡單,支持無限重聽和跳過。 #### (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=打開我愛猜歌名 (喚醒) 返回結果 ```json {"code": 0, "msg": "ok", "result"{ "_text": "打開我愛猜歌名", "msg_id": "dc5806dd-8421-46a5-b92d-6df7f5f560bd", "intents": [ { "parameters": { "想玩": "打開我愛猜歌名", "cueWords": "“再聽一遍”##“跳過”##“我不知道”", "service": "woaicaigeming" }, "action": "猜歌名-開始", "name": "猜歌名-開始", "result": { "name": "天蝎蝴蝶", "artist": "阿杜", "a_url": "https://ruyi-static.ruyi.ai/a402.mp3", "id": "402", "b_url": "https://ruyi-static.ruyi.ai/b402.mp3", "lastSongName": "天蝎蝴蝶", "lastSingerName": "阿杜", "visitTimes": 128 "text": "歡迎來玩我愛猜歌名,游戲很簡單,請聽完每首音樂后回答出歌曲名字,我們現在開始吧。", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "歡迎來到我愛猜歌名。請認真聽完歌曲后回答歌名,現在我們開始吧!" } }, { "type": "wechat.music", "property": { "name": null, "description": null, "music_url": "https://ruyi-static.ruyi.ai/b402.mp3", "title": null } },{ "type": "voice", "property": { "name": null, "voice_url": "https://image.ruyi.ai/%E5%9C%A3%E8%AF%9E%E5%94%A4%E9%86%92.mp3" } }, { "type": "dialog", "property": { "text": "歡迎來玩我愛猜歌名,游戲很簡單,請聽完每首音樂后回答出歌曲名字,我們現在開始吧。", "emotion": "like" } }, { "type": "voice", "property": { "name": null, "voice_url": "https://ruyi-static.ruyi.ai/b402.mp3" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "6fbe3220-b2ae-4834-bb6c-1af304c01f86", "id": "9c70755f-e167-4571-8510-e0be3a1dc005" } ], "meta_process_milliseconds": 391 } ``` **請求示例錯誤** http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=特別的人 (回答錯誤) 返回結果 ```json {"code": 0, "msg": "ok", "result"{ "_text": "特別的人", "msg_id": "50af95da-2bfa-4090-b431-f21c9b327b92", "intents": [ { "parameters": { "text": "特別的人", "fromAnswer": "true", "cueWords": "“重聽”##“跳過”", "cueWords1": "“跳過”##“答案是啥”##“這是什么歌”", "cueWords2": "“重聽”##“跳過”", "cueWords3": "“不玩了”##“重新開始”", "service": "woaicaigeming" }, "action": "猜歌名-回答", "name": "猜歌名-回答", "result": { "name": "答案", "artist": "楊坤、郭采潔", "a_url": null, "id": "614", "b_url": "https://ruyi-static.ruyi.ai/b614.mp3", "isRight": "no", "lastSongId": "467", "lastSongName": "十七歲的雨季", "lastSingerName": "林志穎" "text": "答案是林志穎的《十七歲的雨季》。請聽下一首", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "答案是林志穎的《十七歲的雨季》。請聽下一首" } }, { "type": "wechat.voice", "property": { "name": null, "media_id": "https://ruyi-static.ruyi.ai/b614.mp3", "title": null } }, { "type": "wechat.text", "property": { "text": "答案是林志穎的《十七歲的雨季》。請聽下一首" } }, { "type": "voice", "property": { "name": null, "voice_url": "http://image.ruyi.ai/%E7%AC%AC%E4%BA%8C%E6%AC%A1%E5%9B%9E%E7%AD%94%E9%94%99%E8%AF%AF.wav" } }, { "type": "dialog", "property": { "text": "這首歌是林志穎的《十七歲的雨季》。請認真聽下一首吧。加油哦。", "emotion": "calm" } }, { "type": "voice", "property": { "name": null, "voice_url": "https://ruyi-static.ruyi.ai/b614.mp3" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "6fbe3220-b2ae-4834-bb6c-1af304c01f86", "id": "fede0a44-b597-4242-b751-a61f593f214a" } ], "meta_process_milliseconds": 192 } ``` **請求示例退出** http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=退出 (退出游戲) 返回結果 ```json {"code": 0, "msg": "ok", "result"{ "_text": "退出", "msg_id": "6083d3fa-93e7-49a4-b36f-ee100eea1306", "intents": [ { "parameters": { "cueWords": "“打開我愛猜歌名”", "service": "woaicaigeming" }, "action": "退出", "name": "退出如意技能", "result": { "rightAnswerCount": 1, "score": 1, "rank": 0, "top10": [ { "userId": "ruyi-test-6fbe3220-b2ae-4834-bb6c-1af304c01f86", "score": 1, "rankInTop10": 1 } ], "rankDaily": "1", "scoreBestDaily": 1 "text": "你在我愛猜歌名中答對了1題,你今日的最佳排名是:第1名,棒棒的!", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "你在我愛猜歌名中答對了1題,你今日的最佳排名是:第1名,棒棒的!" } }, { "type": "wechat.text", "property": { "text": "你在我愛猜歌名中答對了1題,擊敗了全國5%的用戶" } }, { "type": "custom", "property": { "name": null, "content": null } }, { "type": "voice", "property": { "name": null, "voice_url": "https://image.ruyi.ai/%E6%9C%89%E6%88%90%E7%BB%A9%E9%80%80%E5%87%BA.mp3" } }, { "type": "dialog", "property": { "text": "你在我愛猜歌名中答對了1題,你今日的最佳排名是:第1名,棒棒的!", "emotion": "like" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "6fbe3220-b2ae-4834-bb6c-1af304c01f86", "id": "153d7a42-c388-45fa-95a2-aa96a8885665" } ], "meta_process_milliseconds": 239 } ``` **詳細參數說明** |名稱|類型|說明| |:---|:---|:--- |service | String |服務名稱 |name|String|歌名 |id | int | 當前歌曲id |artist|String|歌手 |b_url | int |歌曲音頻鏈接 |isRight| String |用戶回答是否正確 |text|String|機器返回內容 |degree | String |相關指標參數 |rightAnswerCount | int |答對題目數量 |lastSongId|int|上一首歌歌曲id |lastSingerName | String |上一首歌手名 |lastSongName| String |上一首歌名 |rankDaily | int |答題得分排名 **指令清單** |指令名稱|范例| |:---|:--- |喚醒 | 打開我愛猜歌名 |重聽 | 重聽 |跳過 | 跳過 |退出 | 退出
                  <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>

                              哎呀哎呀视频在线观看