https://discord.gg/botpress logo
Combining Custom Translations with Translator Agen...
# 🤝help
f
I have a bot that responds in two different languages, depending on the language selected by the user. To handle translations, I'm not using the Translator Agent. Instead, I’ve implemented a hook with a dictionary of predefined translations. Before sending an outgoing message (from the bot to the user), I check this dictionary to find the corresponding translation. This ensures the translations are 100% accurate. Now, I’d like to start using the Translator Agent as well. My question is: is it possible to continue using my custom translation logic (defined in a "before outgoing message" hook), and if the bot’s response is not found in my dictionary, then fall back to the Translator Agent for translation? Has anyone done something similar, or knows if this setup is supported?
p
Unfortunately you cannot call the translator agent programmatically which makes your use case difficult to achieve. Its only controllable parameter is the user's language. You might want to try different llm models to get more tailored translation results if you do choose to use this method. Hope this helps!
f
Oh okay, thank you!