<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.4.9 鬧鐘 #### (1)功能說明 通過語義指令,實現鬧鐘設置、更改、刪除操作,硬件端通過``operation``解析具體操作,支持絕對時間、相對時間鬧鐘設置,如:明天下午一點、360分鐘后等;支持永不重復、每天、每周、每月、每年、工作日等重復模式;支持更改、推遲、提前鬧鐘;支持刪除指定鬧鐘、刪除全部鬧鐘。 #### (2) 接口說明 **請求方法** * POST **請求地址** * http://api.ruyi.ai/v1/message **請求參數說明** |參數名 |參數類型 | 是否必須 |參數說明 | :-----| :---| :---:|:----- |q |String| 是| 自然語言表達,例如“設置明天早上八點的鬧鐘”等 |app_key| String|是 |應用開發者秘鑰,注冊開發者后臺賬號,建立虛擬助理后獲得 |user_id |String| 是 |用戶唯一標識,便于支持個性化語義解析。建議開發者使用 UUID 字符,且不同用戶必須用不同的 user_id,防止意圖串。 #### (3) 返回說明 **返回參數說明** 名稱 | 類型| 說明 ---|------|--- service | string|服務名稱 operation | string|操作 time| string|時間(ms) timedelta| string|時間差(ms) duration| string|時間段(ms) repeat| string|循環模式 ##### operation操作說明 operation | 說明 ---|--- set | 設置 update | 更改 delete|刪除 flush|清空 ##### repeat循環模式說明 repeat| 說明 ---|--- repeatType| 循環類型 timestampOfTheDay| 當日時間(ms) ##### repeatType循環類型說明 repeatType| 說明 ---|--- daily| 每日 weekly| 每周 monthly| 每月 weekday| 工作日 restday|休息日 yearly|每年 **返回代碼說明** |返回代碼 |錯誤類型|說明 |:---|:---|:--- |0/200 |成功 |請求成功 |400 |無效請求 |某些必需參數缺失或參數值錯誤,詳見msg字段 |401 |未授權 |授權失敗,app_key 缺失或錯誤 |403 |請求被禁止|有效請求,但服務拒絕響應,請聯系contact@ruyi.ai |408 |請求超時 |請求響應超時,一般響應時間設置為2000ms以內 |429 |短時間內大量訪問 |短時間內請求數過多 |500 |內部錯誤 |服務處理異常 |503 |服務不可用|服務異常或正在維護 #### (4) 請求示例 **請求范例** 1、設置鬧鐘 _設置明天早上八點的鬧鐘_ _定每天下午五點的鬧鐘_ _設置工作日早上六點的鬧鐘_ _定兩小時后的鬧鐘_ 2、修改鬧鐘 _把明天早上八點的鬧鐘延后兩小時_ _把明天早上八點的鬧鐘改成明天早上十點_ _把明天早上八點的鬧鐘調整為每天早上十點_ 3、刪除鬧鐘 _刪除所有鬧鐘_ _刪除明天早上八點的鬧鐘_ _刪除工作日晚上五點的鬧鐘_ **參數解析** **場景**|**鬧鐘意圖**|**需要解析的字段** :-----:|:-----:|:-----: 設置鬧鐘|√設置\_絕對時刻|operation,time 設置鬧鐘|√設置\_循環時間|operation,repeat 設置鬧鐘|√設置\_相對時間(倒計時)|operation,duration 設置鬧鐘|√設置\_相對時間|operation,timedelta 刪除鬧鐘|√刪除\_循環時間|operation,repeat 刪除鬧鐘|√刪除\_絕對時刻|operation,time 刪除鬧鐘|√刪除\_所有鬧鐘|無 刪除鬧鐘|√2刪除\_所有鬧鐘\_確認|operation 刪除鬧鐘|√2刪除\_所有鬧鐘\_取消|無 刪除鬧鐘|√刪除\_模糊刪除鬧鐘|無 調整鬧鐘時間|√循環時間A>循環時間B|operation,repeat1,repeat2 調整鬧鐘時間|√絕對時刻A>絕對時刻B|operation,time1,time2 調整鬧鐘時間|√循環時間>絕對時刻|operation,time 調整鬧鐘時間|√絕對時刻>循環時間"|operation,repeat,time 調整鬧鐘時間|√絕對時刻>前后移|operation,timedelta,time 調整鬧鐘時間|√循環時間>前后移|operation,timedelta,repeat 引導|不明確\_你能鬧鐘嗎|無 **請求示例** 設置鬧鐘請求示例"設置明天早上八點的鬧鐘" * http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=設置明天早上八點的鬧鐘 返回結果 ```json { "_text": "設置明天早上八點的鬧鐘", "msg_id": "b26be758-d06e-4260-885e-e28e207a4411", "intents": [ { "parameters": { "time_raw": "明天早上八點", "time": "1495843200000", "operation": "set", "set": "set", "alarm": "ALARM", "any": "", "service": "alarm" }, "action": "dialog", "name": "√設置_絕對時刻", "result": { "text": "好的,已為您設置明天早上八點的鬧鐘!", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "好的,已為您設置明天早上八點的鬧鐘!" } }, { "type": "dialog", "property": { "text": "好的,已為您設置明天早上八點的鬧鐘!", "emotion": "positive" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "id": "93ae9452-26f4-4482-a898-89824156a6f1" } ], "meta_process_milliseconds": 64 } ``` **請求示例** 修改鬧鐘請求示例"把明天早上八點的鬧鐘延后兩小時" * http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=把明天早上八點的鬧鐘延后兩小時 返回結果 ```json { "_text": "把明天早上八點的鬧鐘延后兩小時", "msg_id": "bb8ff487-3616-418a-982d-4282933315c7", "intents": [ { "parameters": { "time": "1495843200000", "time_raw": "明天早上八點", "timedelta_raw": "延后兩小時", "timedelta": "7200000", "operation": "update", "service": "alarm" }, "action": "dialog", "name": "√絕對時刻>前后移", "result": { "text": "好的,已為您把明天早上八點的鬧鐘延后兩小時!", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "好的,已為您把明天早上八點的鬧鐘延后兩小時!" } }, { "type": "dialog", "property": { "text": "好的,已為您把明天早上八點的鬧鐘延后兩小時!", "emotion": "positive" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "id": "a800045f-a5f7-4915-b7ee-bde611f9a416" } ], "meta_process_milliseconds": 119 } ``` **請求示例** 刪除鬧鐘請求示例"刪除工作日晚上五點的鬧鐘" * http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=刪除工作日晚上五點的鬧鐘 返回結果 ```json { "_text": "刪除工作日晚上五點的鬧鐘", "msg_id": "21183b77-16e0-4f5f-8706-0abf99b5d7af", "intents": [ { "parameters": { "operation": "delete", "repeat": "[{\"repeatType\":\"WEEKDAY\",\"timestampOfTheDay\":61200000}]", "repeat_raw": "工作日晚上五點", "delete": "delete", "alarm": "ALARM", "service": "alarm" }, "action": "dialog", "name": "√刪除_循環時間", "result": { "text": "已為您刪除工作日晚上五點的鬧鐘!", "type": "dialog" }, "outputs": [ { "type": "wechat.text", "property": { "text": "已為您刪除工作日晚上五點的鬧鐘!" } }, { "type": "dialog", "property": { "text": "已為您刪除工作日晚上五點的鬧鐘!", "emotion": "calm" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "id": "f8149216-25b9-4f79-99b9-a1e24e2c7856" } ], "meta_process_milliseconds": 119 } ```
                  <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>

                              哎呀哎呀视频在线观看