Closed asukaminato0721 closed 1 year ago
test py code
import requests
with requests.Session() as session:
r = session.post(
"http://0.0.0.0:1188/translate",
json={"text": "こんにちわ", "target_lang": "EN"},
headers={"Content-Type": "application/json"},
)
print(r.text)
> deeplx
DeepL X has been successfully launched! Listening on 0.0.0.0:1188
Made by sjlleo and missuo.
{"jsonrpc":"2.0","id":8300241001,"result":{"texts":[{"alternatives":[],"text":"good day (daytime greeting)"}],"lang":"JA","lang_is_confident":true,"detectedLanguages":{"JA":0.999979,"unsupported":0.000018999999999999999}}}
[GIN] 2023/02/18 - 20:52:40 | 200 | 1.086378576s | 127.0.0.1 | POST "/translate"
the returned json content
{"code":200,"data":"good day (daytime greeting)","id":8301079001}
Thanks, but it seems that there are still some possible problems with this program at the moment. I'm working on fixing that.
Sorry, I haven't used aur, so I don't know much about it. Have you tested this way?