Skip to content

Commit

Permalink
can exit kudasai when selecting translation method
Browse files Browse the repository at this point in the history
  • Loading branch information
Bikatr7 committed May 15, 2024
1 parent 24da5b1 commit eec366c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/common/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ async def initialize() -> None:
"3": ("deepl", FileEnsurer.deepl_api_key_path),
}

method = input("What method would you like to use for translation? (1 for OpenAI, 2 for Gemini, 3 for Deepl) : \n")
method = input("What method would you like to use for translation? (1 for OpenAI, 2 for Gemini, 3 for Deepl, or any other key to exit) : \n")

if(method not in translation_methods.keys()):
print("\nThank you for using Kudasai, goodbye.")
time.sleep(2)
FileEnsurer.exit_kudasai()

Translator.TRANSLATION_METHOD, api_key_path = translation_methods.get(method, ("deepl", FileEnsurer.deepl_api_key_path))

Expand Down

0 comments on commit eec366c

Please sign in to comment.