<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 3.2.8 猜猜我是誰 #### (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": "f368c98c-c857-4d13-a029-75ac943b482b", ???"intents": [ ???????{ ???????????"parameters": { ???????????????"correctAnswer": "園丁", ???????????????"currentQuestionIndex": "1", ???????????????"currentDescribeIndex": "1", ???????????????"userAnswer": "園丁", ???????????????"correctAnswerCount": "0", ???????????????"automaticExit": "0", ???????????????"service": "guessWho" ???????????}, ???????????"action": "玩游戲", ???????????"name": "玩游戲", ???????????"result": { ???????????????????????"describe": "我善于觀察生活", ???????????????????????"introduce": "", ???????????????????????"answer": "作家", ???????????????????????"previousCorrectAnswer": "", ???????????????????????"correctAnswerCount": 1, ???????????????????????"currentQuestionIndex": 2, ???????????????????????"currentDescribeIndex": 1, ???????????????????????"isCorrectly": 1, ???????????????????????"automaticExit": 0 ???????????????????????"text": "猜對啦,這對你太簡單啦!現在你猜我是誰,我善于觀察生活,猜到了嗎?", ????????????????????????"type": "dialog" ???????????}, ???????????"outputs": [ ???????????????{ ???????????????????"type": "wechat.text", ???????????????????"property": { ???????????????????????"text": "猜對啦,這對你太簡單啦!現在你猜我是誰,我善于觀察生活,猜到了嗎?" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "voice", ???????????????????"property": { ???????????????????????"name": null, ???????????????????????"voice_url": "http://image.ruyi.ai/%E7%AD%94%E5%AF%B9.mp3" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "dialog", ???????????????????"property": { ???????????????????????"text": "哇,一下揭穿了我的身份!真聰明!現在你猜我是誰,我善于觀察生活,猜到了嗎?", ???????????????????????"emotion": "naughty" ???????????????????} ???????????????} ???????????], ???????????"score": "1.0", ???????????"scoreColor": "c4", ???????????"is_match": 1, ???????????"skill_id": "ab5dfa85-b8e0-4c49-bf74-6ea914de15e5", ???????????"id": "174fc71a-f205-48ad-aad1-09a7cfce2c3b" ???????} ???], ???"meta_process_milliseconds": 176 } ``` **請求示例重復** 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": "d7ccc05d-f5f4-4c25-a007-1f94b021f548", ???"intents": [ ???????{ ???????????"parameters": { ???????????????"repeat": "1", ???????????????"correctAnswer": "作家", ???????????????"currentDescribeIndex": "1", ???????????????"correctAnswerCount": "1", ???????????????"currentQuestionIndex": "2", ???????????????"automaticExit": "0", ???????????????"service": "guessWho" ???????????}, ???????????"action": "玩游戲", ???????????"name": "重復", ?????????????"result": { ???????????????????????"describe": "我善于觀察生活", ???????????????????????"introduce": "", ???????????????????????"answer": "作家", ???????????????????????"previousCorrectAnswer": "", ???????????????????????"correctAnswerCount": 1, ???????????????????????"currentQuestionIndex": 2, ???????????????????????"currentDescribeIndex": 1, ???????????????????????"isCorrectly": 0, ???????????????????????"automaticExit": 0 ????????????????????????"text": "豎起耳朵仔細聽哦,我善于觀察生活。 你知道我是誰嗎?", ?????????????????????????"type": "dialog" ???????????}, ???????????"outputs": [ ???????????????{ ???????????????????"type": "wechat.text", ???????????????????"property": { ???????????????????????"text": "豎起耳朵仔細聽哦,我善于觀察生活。 你知道我是誰嗎?" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "dialog", ???????????????????"property": { ???????????????????????"text": "豎起耳朵仔細聽哦,我善于觀察生活。 你知道我是誰嗎?", ???????????????????????"emotion": "suspect" ???????????????????} ???????????????} ???????????], ???????????"score": "1.0", ???????????"scoreColor": "c4", ???????????"is_match": 1, ???????????"skill_id": "ab5dfa85-b8e0-4c49-bf74-6ea914de15e5", ???????????"id": "bd40a0d4-bd76-4e37-813d-df5a01bec5b9" ???????} ???], ???"meta_process_milliseconds": 216 } ``` **請求示例錯誤** 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": "4d25de0a-852d-4a87-83b8-c76ebbf645d9", ???"intents": [ ???????{ ???????????"parameters": { ???????????????"correctAnswer": "作家", ???????????????"currentQuestionIndex": "2", ???????????????"currentDescribeIndex": "1", ???????????????"userAnswer": "警察", ???????????????"correctAnswerCount": "1", ???????????????"automaticExit": "0", ???????????????"service": "guessWho" ???????????}, ???????????"action": "玩游戲", ???????????"name": "玩游戲", ???????????"result": { ???????????????????????"describe": "我喜歡和文字打交道", ???????????????????????"introduce": "", ???????????????????????"answer": "作家", ???????????????????????"previousCorrectAnswer": "", ???????????????????????"correctAnswerCount": 1, ???????????????????????"currentQuestionIndex": 2, ???????????????????????"currentDescribeIndex": 2, ???????????????????????"isCorrectly": 0, ???????????????????????"automaticExit": 0 ???????????????????????"text": "再猜猜看吧!我喜歡和文字打交道。 你知道我是誰嗎?", ???????????????????????"type": "dialog" ???????????}, ???????????"outputs": \[ ???????????????{ ???????????????????"type": "wechat.text", ???????????????????"property": { ???????????????????????"text": "再猜猜看吧!我喜歡和文字打交道。 你知道我是誰嗎?" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "voice", ???????????????????"property": { ???????????????????????"name": null, ???????????????????????"voice\_url": "http://image.ruyi.ai/%E7%AC%AC%E4%B8%80%E6%AC%A1%E5%9B%9E%E7%AD%94%E9%94%99%E8%AF%AF.mp3" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "dialog", ???????????????????"property": { ???????????????????????"text": "再猜猜看吧!我喜歡和文字打交道。 你知道我是誰嗎?", ???????????????????????"emotion": "suspect" ???????????????????} ???????????????} ???????????], ???????????"score": "1.0", ???????????"scoreColor": "c4", ???????????"is_match": 1, ???????????"skill_id": "ab5dfa85-b8e0-4c49-bf74-6ea914de15e5", ???????????"id": "174fc71a-f205-48ad-aad1-09a7cfce2c3b" ???????} ???], ???"meta_process_milliseconds": 95 } ``` **請求示例退出** 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": "e9b8f75c-4861-4be2-a0bd-c572c1c8ef23", ???"intents": [ ???????{ ???????????"parameters": { ???????????????"退出詞典": "結束", ???????????????"correctAnswerCount": "1", ???????????????"service": "guessWho" ???????????}, ???????????"action": "退出", ???????????"name": "退出如意技能", ????????????"result": { ???????????????????????"introduce": "", ???????????????????????"previousCorrectAnswer": "", ???????????????????????"correctAnswerCount": 1, ???????????????????????"maxScore": 1, ???????????????????????"isCorrectly": 0, ???????????????????????"automaticExit": 1 ???????????????"text": "你在猜猜我是誰中猜對了1個人物,加油呀!", ???????????????"type": "dialog" ???????????}, ???????????"outputs": [ ???????????????{ ???????????????????"type": "wechat.text", ???????????????????"property": { ???????????????????????"text": "你在猜猜我是誰中猜對了1個人物,加油呀!" ???????????????????} ???????????????}, ???????????????{ ???????????????????"type": "dialog", ???????????????????"property": { ???????????????????????"text": "你在猜猜我是誰中猜對了1個人物,加油呀!", ???????????????????????"emotion": "suspect" ???????????????????} ???????????????} ???????????], ???????????"score": "1.0", ???????????"scoreColor": "c4", ???????????"is_match": 1, ???????????"skill_id": "ab5dfa85-b8e0-4c49-bf74-6ea914de15e5", ???????????"id": "f891b32c-2483-4465-9b4e-e007396010af" ???????} ???], ???"meta_process_milliseconds": 174 } ``` **詳細參數說明** |名稱|類型|說明| |:---|:---|:--- |service | String |服務名稱 |userAnswer|String|用戶回答的答案:第一次出題時可不用傳值,其余情況傳入用戶所說的答案 |correctAnswer | String | 題目正確答案:出題時,機器返回的數據中包含了正確答案(result的answer字段),用戶回答時需傳入進行答案匹配,第一次出題時可不傳值 |currentQuestionIndex | int |答題過程中傳入當前題目的序號(result中的currentQuestionIndex字段),第一次出題時/重玩等傳0,參數默認值為0 |currentDescribeIndex|int|答題過程中傳入當前題目的描述順序(result的currentDescribeIndex字段),當需要跳過當前題目時,傳0,參數的默認值為0 |correctAnswerCount | int |回答正確題目的數量(result的correctAnswerCount字段),每次用戶答題時傳回當前答對題目的數量,新出題時傳0,默認為0 |size|int|獲取題目的數量,默認50 |repeat | int |是否重復,1為重復,0為不重復,不傳值則默認傳0 |jump|int|是否跳過,1為跳過,0為不跳過,不傳值則默認傳0 |describe| String |當前問題的一句話介紹(同previousCorrectAnswer,僅用戶三次回答不對和跳過的時候存在,其余返回空) |introduce|String|當前問題的一句話介紹(同previousCorrectAnswer,僅用戶三次回答不對和跳過的時候存在,其余返回空) |answer | String |當前問題答案 |isCorrectly|String|用戶答案是否正確,正確返回回答正確時的currentDescribeIndex,其余返回0 |previousCorrectAnswer | String |前一個問題的答案(僅用戶三次回答不對和跳過的時候存在,其余返回空) **指令清單** |指令名稱|范例| |:---|:--- |喚醒 | 猜猜我是誰 |說職業 | 園丁 |重復 | 重復 |退出 | 退出
                  <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>

                              哎呀哎呀视频在线观看