This is a feature from my project "Chat with Documents", where a human asks a question and GPT answers based on a collection of documents. Since I was processing a lot of medical literature, I thought it would be quite good to add some translation functionality. I started with the integration of "argostranslate". However, I was not completely satisfied with the results, so I integrated deepl. Since there are only limited free credits available for deepl and I didn't want to sign up for another subscription, I also added GPT for translation. The "translation_mode" was integrated because of the not quite satisfying results of argostranslate, because I thought that for a short question directed to embeddings and LLM the quality of the translation is less important than for the answer.
Language of human and machine are defined manually. Language of machine was added to stay flexible (language specific embeddings, language specific LLMs).
The following "translation_mode" exist:
- "no tra