AI midjourney翻译问题

xy3

问题描述

有时候翻译可能会出现问题,可以改prompt优化

报错信息

curl "https://plus.chatyx.net/app/ai/chat/translate" ^
  -H "accept: application/json, text/javascript, */*; q=0.01" ^
  -H "accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
  -H "content-type: application/json" ^
  -H "cookie: PHPSID=84b7467d1a8cd9413be40d8d62467a32" ^
  -H "origin: https://plus.chatyx.net" ^
  -H "priority: u=1, i" ^
  -H "referer: https://plus.chatyx.net/app/ai/painting" ^
  -H ^"sec-ch-ua: ^\^"Chromium^\^";v=^\^"124^\^", ^\^"Microsoft Edge^\^";v=^\^"124^\^", ^\^"Not-A.Brand^\^";v=^\^"99^\^"^" ^
  -H "sec-ch-ua-mobile: ?0" ^
  -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
  -H "sec-fetch-dest: empty" ^
  -H "sec-fetch-mode: cors" ^
  -H "sec-fetch-site: same-origin" ^
  -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0" ^
  -H "x-requested-with: XMLHttpRequest" ^
  --data-raw ^"^{^\^"content^\^":^\^"^小^猫^吃^鱼^\^"^}^"

返回内容很奇怪
{content: "好的,请发送要翻译的内容"}
相当于直接把上一次回复发了一次

修改后程序代码

改为英文可能更容易输出英文

$modelRequestData->data = [
            'model' => $model,
            'temperature' => 1,
            'messages' => [
                ['role' => 'user', 'content' => $prompt],
                ['role' => 'assistant', 'content' => 'Okay, please send the content to be translated'],
                ['role' => 'user', 'content' => "Please translate:$content"]
            ],
        ];
290 1 0
1个回答

walkor 打赏

会不会curl有问题?你的curl命令有很多特殊字符,执行不了
翻译这块一直挺好用的,没遇到过你说的问题

  • xy3 2024-05-18

    这个是我浏览器f12的右键复制出来的;翻译不行也可能是我对接的中转3.5 0125有点问题

×
🔝