PantsuDango / Dango-Translator

团子翻译器 —— 个人兴趣制作的一款基于OCR技术的翻译器
GNU Lesser General Public License v2.1
7.15k stars 524 forks source link

Allow Custom Prompt for ChatGPT #111

Closed nagisa-eevee closed 10 months ago

nagisa-eevee commented 1 year ago

能否允许用户自定义ChatGPT的prompt(system&user)?代码里写的prompt可能效果不是很好。

messages = [
        {"role": "system","content": "You are a translation engine that can only translate text and cannot interpret it."},
        {"role": "user", "content": "translate from {} to chinese".format(language_map[language])},
        {"role": "user", "content": content}
    ]
PantsuDango commented 1 year ago

采纳,我会在未来更新此功能,非常感谢建议~

PantsuDango commented 10 months ago

已实现