When we try to build chatbot for multilingual, the barrier of this is always prompt. We have to write prompt to each languages that we want to deal with.
This MultilingualPromptTemplate will detect user's question language automatically, and make prompt for that language.
You can set support languages and its prompts.
Plus, if you don't have language configure for new one, DeepL or other translator can translate prompt and pass it to LLM.
Auto-detect user's input language
Set prompt for user's language
If pre-config is not existed, translate prompt for their language (optional feature)
When we try to build chatbot for multilingual, the barrier of this is always prompt. We have to write prompt to each languages that we want to deal with. This MultilingualPromptTemplate will detect user's question language automatically, and make prompt for that language. You can set support languages and its prompts. Plus, if you don't have language configure for new one, DeepL or other translator can translate prompt and pass it to LLM.