rivescript icon indicating copy to clipboard operation
rivescript copied to clipboard

[Question] Using current trigger on redirection

Open RuiPMoreira opened this issue 8 years ago • 2 comments

Hi,

So, i have a question, i need to use the trigger value on a reply and i don't know how can i do this.

+ [*]portugal[*]
- {topic=countries}{@all_trigger_value}   ----> /*** Here is the problem, how can i send this to match portugal trigger of countris?  ***/

+ *
- Lets talk about countries

< topic countries
    + [*]portugal[*]
    - Portugal is the best
> topic

Ty

RuiPMoreira avatar Jul 13 '17 16:07 RuiPMoreira

Maybe:

<   + [*]portugal[*]
>   + [*](portugal)[*]
    - {topic=countries}<@>

Example: https://play.rivescript.com/s/TYi8KtnU1K

kirsle avatar Jul 13 '17 18:07 kirsle

Ty for the reply,

I don't think so, take a look at this example: https://play.rivescript.com/s/RUtaMvzp5t

On "portugal is awesome", i sould output: "Something about Portugal.What a awesome country."

I'm trying to use this chatbot to put the information of an website in the brain of bot. There exist a lot of topics and subtopics. Example:

Football-
              |-Players-
                             |- Cristiano Ronaldo
                             |- Messi
               |-Teams
                             |-Real Madrid
                             |-Barcelona

What i'm trying to do is, if i'm in the topic random and write ".... Messi .....", it should match the messi trigger in topic players.

That may look a bit confuse, sorry for that.

RuiPMoreira avatar Jul 17 '17 09:07 RuiPMoreira