https://discord.gg/botpress logo
#🤝help
Knowledge Base Language
# 🤝help
l

loud-tiger-92573

07/03/2023, 1:02 PM
I am working on a bot for a German city. I use the knowledge base web search to fill in the information. Sometimes the answer is correctly in German, but sometimes it translates in English (same question - sometimes German sometimes English). Is there a way to force a German answer to a question?
b

billowy-kilobyte-16509

07/04/2023, 4:56 PM
same problem here!
a

acceptable-kangaroo-64719

07/05/2023, 10:55 AM
Hey @loud-tiger-92573 are you using the translation agent?
e

echoing-alligator-45845

08/09/2023, 10:16 AM
I have the same problem @acceptable-kangaroo-64719. I have them choose a hard coded language in the beginning, but when it comes "raw input" and taking information from the knowledge base, then it switches over to ENG. Is there a workaround for this?
a

acceptable-kangaroo-64719

08/09/2023, 10:25 AM
You can try passing the knowledge answer through an AI task that explicitly asks for it to be translated to that language.
e

echoing-alligator-45845

08/09/2023, 10:26 AM
I have a single choice in the beginning where they can choose between 5 languages, so how would that work?
a

acceptable-kangaroo-64719

08/09/2023, 10:27 AM
This tutorial covers how to pass a knowledge base answer to an AI task
you would also pass the user's selected language
and prompt the AI to translate
e

echoing-alligator-45845

08/09/2023, 10:28 AM
How do i pass the user's language over (when it's in the beginning of a sequence) without having them choose language one more time?
a

acceptable-kangaroo-64719

08/09/2023, 10:33 AM
pass {{user.TranslatorAgent.language}} into the AI task input
e

echoing-alligator-45845

08/09/2023, 12:53 PM
It does not work. Is there a way to save the answer from the single choice and pass it on to a later node?
a

acceptable-kangaroo-64719

08/10/2023, 10:36 AM
yes, make or select a variable from this dropdown menu and then you can use that variable with either
@variableName
or
{{workflow.variableName}}
throughout the flow

https://cdn.discordapp.com/attachments/1125411267155345440/1139145335692865598/image.png

4 Views