Cerlancism / chatgpt-subtitle-translator

Efficient translation tool based on ChatGPT API
https://cerlancism.github.io/chatgpt-subtitle-translator/
MIT License
145 stars 16 forks source link

请问该代码支持字幕上下文识别吗? #30

Open larny opened 3 weeks ago

larny commented 3 weeks ago

开发者您好,

感谢您开发的库,非常有用。有两个问题想咨询下。

  1. 是否支持字幕的上下文读取?如果不按照逐行翻译,把整段输入到gpt4里,模型会根据上下文做参考,典型应用在于字幕中经常使用代词“它”、“这个”,如果逐行翻译可能无法识别之前输入到模型中的内容,导致翻译结果仍为“It“, ”This "。

  2. 是否支持输入词典(额外的promt语句),有的专有名词希望能对应翻译我设置的词典。

Regards, Larny

Cerlancism commented 3 weeks ago
  1. 上下文读取默认是 100 行,前文历史默认史是 10
    • Web GUI 只用默认
    • CLI 可设置 --batch-sizes --history-prompt-length
  2. 这是 System Instruction, 默认是 Translate ${from} to ${to},
    • Web GUI 可设置 System Instruction
    • CLI 可设置 --system-instruction
larny commented 3 weeks ago

谢谢您的解答,非常有用~

Chen Yu @.***>于2024年6月24日 周一02:01写道:

  1. 上下文读取默认是100行,前文历史默认史是10行
    • Web GUI 只用默认
    • CLI 可设置 --batch-sizes --history-prompt-length
  2. 自填写
    • Web GUI 可设置 System Instruction
    • CLI 可设置 --system-instruction

— Reply to this email directly, view it on GitHub https://github.com/Cerlancism/chatgpt-subtitle-translator/issues/30#issuecomment-2185255074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFS7HYN55OIS4AGS4AZQXA3ZI4EPDAVCNFSM6AAAAABJYHDHB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVGI2TKMBXGQ . You are receiving this because you authored the thread.Message ID: @.***>