diff --git a/translator_script.py b/translator_script.py index 9ce8817761118343e29b70b408a5f0a635f28dd1..9534bf1edf75cac4f2faa4664dd44a948f84d462 100644 --- a/translator_script.py +++ b/translator_script.py @@ -408,6 +408,10 @@ if file_content: final_translation_of_chunk = only_improved_translations[best_version_num] #EXTRACT THE FINAL TRANSLATION + # Replaces the original translation in messages with the best translation to give the ChatGPT the best translation as context + #TODO this is ugly code. + previous_messages[len(previous_messages)-1]["content"] = final_translation_of_chunk + #final_translation_of_chunk = extract_final_translation(improved_trans_with_rationale[0]) write_to_file("./debug/chunk"+str(i)+"_final_translation.md", final_translation_of_chunk)