Try to improve the auto translation.

This commit is contained in:
OK 2023-08-21 13:28:39 +02:00
parent 8a5cef4deb
commit 9d1d99ac50

View File

@ -296,7 +296,8 @@ class AIResponder(object):
if 'fix-model' not in self.config:
return text
message = [{"role": "system", "content": f"You are an professional translator to {language} language,"
f" you translate everything you get directly to {language}."},
f" you translate everything you get directly to {language}"
f" if it is not already in {language}, otherwise you just copy it."},
{"role": "user", "content": text}]
try:
result = await openai.ChatCompletion.acreate(model=self.config["fix-model"],