<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.4.5 翻譯類技能 #### (1) 功能說明 技能列表 |技能名稱|service|功能介紹| |---------|--------|---------| |中譯英|translation|用于單詞和句子的中譯英。1. 命令模式。用戶說【中譯英模式】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。2. 無需啟動翻譯模式的自然語義翻譯。例如:用戶說“xxx的英文”等即可實現即時翻譯。| |英譯漢|translation_en|用于單詞和句子的英譯漢。命令模式。用戶說【英譯漢模式】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |古文翻譯|ch_wyw|用于中文詞語和句子的文言文翻譯。用戶說【古文翻譯】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯阿拉伯語|ch_ara|用于單詞和句子的中譯阿拉伯語。用戶說【中譯阿拉伯語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯愛沙尼亞語|ch_est|用于單詞和句子的中譯愛沙尼亞語。用戶說【中譯愛沙尼亞語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯保加利亞語|ch_bul|用于單詞和句子的中譯保加利亞語。用戶說【中譯保加利亞語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯波蘭語|ch_pl|用于單詞和句子的中譯波蘭語。用戶說【中譯波蘭語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯丹麥語|ch_dan|用于單詞和句子的中譯丹麥語。用戶說【中譯丹麥語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯德|ch_de|用于單詞和句子的中譯德。用戶說【中譯德】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯俄|ch_ru|用于單詞和句子的中譯俄。用戶說【中譯俄】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯法|ch_fra|用于單詞和句子的中譯法。用戶說【中譯法】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯芬蘭語|ch_fin|用于單詞和句子的中譯芬蘭語。用戶說【中譯芬蘭語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯韓|translation_kor|用于單詞和句子的中譯韓。用戶說【中譯韓】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯荷蘭語|ch_nl|用于單詞和句子的中譯荷蘭語。用戶說【中譯荷蘭語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯捷克語|ch_cs|用于單詞和句子的中譯捷克語。用戶說【中譯捷克語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯羅馬尼亞語|ch_rom|用于單詞和句子的中譯羅馬尼亞語。用戶說【中譯羅馬尼亞語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯葡|ch_pt|用于單詞和句子的中譯葡萄牙語。用戶說【中譯葡】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯日|translation_jp|用于單詞和句子的中譯日。用戶說【中譯日】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯瑞典語|ch_swe|用于單詞和句子的中譯瑞典語。用戶說【中譯瑞典語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯斯洛文尼亞語|ch_slo|用于單詞和句子的中譯斯洛文尼亞語。用戶說【中譯斯洛文尼亞語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯泰|ch_th|用于單詞和句子的中譯泰。用戶說【中譯泰】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯西|ch_spa|用于單詞和句子的中譯西班牙語。用戶說【中譯西】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯希臘語|ch_el|用于單詞和句子的中譯希臘語。用戶說【中譯希臘語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯越南語|ch_vie|用于單詞和句子的中譯越南語。用戶說【中譯越南語】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯粵|ch_yue|用于詞語和句子的中文譯粵語。用戶說【中譯粵】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| |中譯意|ch_it|用于單詞和句子的中譯意大利語。用戶說【中譯意】,則翻譯模式進行;退出翻譯時,用戶需說【退出】即可。| #### (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": "68d7a91e-9147-49e6-a20d-d2b434f71724", "intents": [{ "parameters": { "service": "translation" }, "action": "asking", "name": "翻譯_中譯英_進行1", "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": "133e8372-ef82-4b9d-bb7c-96b35ae169ea" }], "meta_process_milliseconds": 65 } } ``` **請求示例** (中譯英過程) * 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": "d6f15559-fd6b-428a-8e76-45d964d5ffba", "intents": [{ "parameters": { "q": "你的名字叫什么", "from": "zh", "to": "en", "any": "你的名字叫什么", "標簽云": "你可以說:退出,退出翻譯,翻譯一下某某", "service": "translation" }, "action": "翻譯", "name": "0_翻譯_中譯英_進行2", "result": { "code": 200, "response": { "from": "zh", "to": "en", "trans_result": [{ "src": "你的名字叫什么", "dst": "What's your name?" }] }, "text": "What's your name?", "type": "dialog" }, "outputs": [{ "type": "wechat.text", "property": { "text": "What's your name?" } }, { "type": "dialog", "property": { "text": "What's your name?", "emotion": "calm" } }], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "451074cb-7076-4c92-aa35-5c4ad1a870d1", "id": "a3413d3b-dc80-4156-afc2-955349eb0270" }], "meta_process_milliseconds": 174 } } ``` **請求示例** (中譯英退出) * 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": "f4ce39e9-7221-464c-9e87-d6ad6c29fe3f", "intents": [{ "parameters": { "service": "translation" }, "action": "anwser", "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": "d2b3c77c-c677-4528-8a98-c6037cbac5d3" }], "meta_process_milliseconds": 40 } } ``` **請求示例** (一句話翻譯) * 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": "dc0020d8-ec73-48a5-95e5-361e848ab9e1", "intents": [{ "parameters": { "q": "蘋果", "from": "zh", "to": "en", "any": "蘋果", "標簽云": "你可以說:退出,退出翻譯,翻譯一下某某", "service": "translation" }, "action": "翻譯", "name": "2_翻譯_中譯英_不接受暗號版本", "result": { "code": 200, "response": { "from": "zh", "to": "en", "trans_result": [{ "src": "蘋果", "dst": "Apple" }] }, "text": "Apple", "type": "dialog" }, "outputs": [{ "type": "wechat.text", "property": { "text": "Apple" } }, { "type": "dialog", "property": { "text": "Apple", "emotion": "calm" } }], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "451074cb-7076-4c92-aa35-5c4ad1a870d1", "id": "b432ea7d-4e69-415f-968c-53f200e3ee4c" }], "meta_process_milliseconds": 192 } } ``` **詳細參數說明** |名稱|類型|說明| |:---|:---|:--- |service | String |服務名稱 |from|String|來源,“zh”是中文 |to|String|結果,“en”是英文 |src|String|中文的來源文本 |dst|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>

                              哎呀哎呀视频在线观看