Translator bug
# 🤝help
r
Yo ! here is the screenshot. In the logs we can see that he sends the message in the language i want (french) but in the actualy bot he translates it to english. thanks
@bumpy-butcher-41910 thanks for your answer in advance
And we can see too that the next question he asks it in english with the answers in english too
All the bot is design to speak French or German (user choices start of flow) i then executed a code to put it in a variable for the rest of the flow.
Here we can see that it is supposed to be in french. it recognizes that it should be french. still goes to english 😛
b
can you show me your translator agent? 🙂
r
b
if you tick that box, your bot should automatically detect that your user's speaking in X language
and respond in X language
comme ceci:
r
unfortunatly i've been testing it around, and i notice that sometimes this same case happens (where the bot just casually changes the language of the flow) so i decided to come into a hard setup where i ask the user to select the language.
b
it can be finnicky based on what language it thinks your user is speaking, kind of like how google translate will occasionally detect the incorrect language
I can't see why it would be sending that message in English though
I'm gonna tag @acceptable-kangaroo-64719 who might know more 😮
r
Thanks ! ill try to figure it how somehow meanwhile
ill keep in touch here
f
Did you try the "Start as new user" option?
What do you have in your personality?
r
personality is off. less latency for my clients. Yes i triend new user, i tried in the popup chat. same issue :/
even tried to re-upload my kb (its founding the answer in a specific file (which i want)), still same issue
f
Sorry I am missing something
Where do you set the language?
r
its really odd. even in the logs here we can see that the message is being sent in french. still have the english reply
f
That means there is a rewrite ☝️
One more question, you have the bot in French and you speaking to it in French, correct?
Why do you need the translator agent active?
r
No. Start of the flow i give the option to the user for French or German (client have both languages users in their website). I store his answer in a variable, execute a code for the translator to pick it from that variable: if (workflow.userLanguage === 'Français') { // Définir la langue de l'utilisateur en français user.TranslatorAgent.language = "Français"; } else if (workflow.userLanguage === 'Deutsch') { // Définir la langue de l'utilisateur en allemand user.TranslatorAgent.language = "Deutsch"; } else { console.log('Désolé, je ne reconnais pas cette langue. Veuillez choisir entre le français et l\'allemand.'); }
I had automatic detect user language, but had alot of times where the bot just translates to english. everything was working fine until now that i added a bit more of KB.
f
Why don't you use those options?
Plus user.TranslatorAgent.language uses iso codes. So "fr" for French
r
Hmm i see what you mean. Single choice- french = go into a node where it sets the user language in french, and connect it to the main flow same for german ??
f
yeeep
remember the iso code
nor the language
r
like so right ? ill give it a try
thanks for the tip
b
wait I've never used the set language card before
incredible, love to learn new things haha thanks team
f
@rough-magician-49397 keep me posted 🙂
@bumpy-butcher-41910 one team 💪
r
Arf same issue. I dont know why 😦
f
How do you set the language?
And now you can turn off the translator agent
r
AHHH
nice
i turned off translator
😄 😄
f
And it worked!
r
Celebratiiion
thanks
f
Hohooooo 💃
You're welcome
Happy bot building 🚀
r
🥳 🥳 🥳 🥳
b
🤖
r
Can i maybe take a bit of your time for another question not related? In my flow there is a certain answer in a certain node from the bot that i want to extract into a variable. Is this something doable ? Use Case: Bot gives answer Bot asks: are you happy with the answer: User: No, (explains what is wrong) I want to be able to capture the bot answer into a variable so i can analyse what the user wanted and what the bot said. I am retrieving the user info already into a google sheet. but if i can retrieve the bot answer (instead of searching in logs) would be like 100000% better. Sorry for taking so much of your time fellas you guys are the best
f
Yes, you can add it to an array, log it when you need to
r
In other words, can i use this {{turn.KnowledgeAgent.answer}} in a code like this: workflow.makeSuccess = false const leadData = { feedback: workflow.feedback, conversationID: workflow.conversationId } // Replace YOUR_ZAPIER_URL_HERE with your zapier webhook url try { const response = await axios.post(test', leadData) console.log(response.data) workflow.makeSuccess = true } catch (error) { console.error(error) }
f
Yes you can 🙂
2 Views