machinewrapped / gpt-subtrans

Open Source project using LLMs to translate SRT subtitles
Other
347 stars 40 forks source link

Copy from another project, parameters are replaced in prompt #113

Closed Neoony closed 7 months ago

Neoony commented 8 months ago

I have noticed one issue with Copy from Another Project.

Its about the prompt in the instructions.

For example I have prompt (just default): Please translate these subtitles[ for movie][ to language].

In 1.subtrans as soon as I hit Translate(I think), this changes into e.g.: Please translate these subtitles for True Detective s03e01 to Czech.

Yeah I put the season and episode into the name. (so that it knows which season / episode it is and potentially use some info from its built-in dataset about it, could probably also just do it in Description...but then maybe you are just translating into multiple languages and that would have the same issue)

However as you can already tell, when you copy from another project, this is copied as well. And I actually didnt even realize that for few episodes, until I just took a peek into one .subtrans file. Since I basically never change that prompt, I barely even looked at it in Edit Instructions, so it might get missed easily I would say. I would change the Movie Name for next episode thinking it applies, but it actually didnt.

I get that gpt-subtrans replaces it and then saves it in the .subtrans and then its used for translation without replacing it every API call or so. Perhaps it should save separately inside .subtrans? e.g. "original_prompt": "Please translate these subtitles for[ for movie][ to language].", "prompt": "Please translate these subtitles for True Detective s03e01 to Czech.",

And then when copying from another project, it would just take original_prompt

I am not sure if such parameters can be used also in other fields or similar. But I would say this is something that one does not expect to happen.

machinewrapped commented 8 months ago

It's actually not supposed to replace the tags in the prompt in the settings, only when it is sent to the translator... it was an unintended result from recent changes. I'll try to track down why it's happening :)

machinewrapped commented 7 months ago

Fixed in 0.5.5 https://github.com/machinewrapped/gpt-subtrans/releases/tag/v0.5.5

However, if the prompt has already been written to a project file it will not be reverted automatically, so you will need to restore the default prompt and save the project if you want to copy the settings from it to another project.

Please translate these subtitles[ for movie][ to language].

Neoony commented 7 months ago

This works good Thanks!