Hello, i am trying to create a multi-language chat bot in chatscript, by multi-language i mean i wan’t to handle various patterns based on language selection (I’m not considering dictionaries and interjections, I’m working in #DO_ESSENTIALS mode). Right now I consider only input, the output is english only for now. I would like to handle my patterns this way :
u: (^match(^getPattern(^join(“pattern1_” $LANGUAGE))))
Nice to meet you, ‘_0
where $LANGUAGE is a global variable that could assume values as ENG and IT, so ^join would produce something like “pattern1_ENG”, ^getPattern would query my DB for pattern with this id, and would return something like “my name is *”, so i would expect ^match to match that pattern. But i just cant seem to make it work, when I strip it up I find out that even rejoinders like :
$$tmp = ^“Hello”
a: (^match($$tmp))
Hi there
wouldn’t work. While this one does :
a: (^match(“Hello”))
Hi there
So I am wondering if what I’m trying to achieve is even possible in this ecosystem, my bet is that chatscript wont permit me to use ^match on dynamic content, and wants all the patterns to be ready at compile time. Am i wrong? Could you please suggest what am I missing and how could I go about it?