This topic is a continuation to Question about running External Events in Rasa X/Callback Input
Spec:
- OS: Win 10
- Python version: 3.8
- Rasa version: 2.0.3
Hi, I was trying to make External Events work in my chatbot. I was doing everything as it was shown in https://rasa.com/docs/rasa/reaching-out-to-user/#external-events and https://github.com/RasaHQ/rasa/blob/master/examples/reminderbot/README.md. I think the problem must be with point 1 & 2 from this tutorial. I am not able to trigger an intent.
Here is how I was doing it:
- I’ve added to my chatbot NLU training data from the tutorial and updated
domain.yml
. - I trained the model with
rasa train
. - From reminderbot’s README.md: I ran
rasa run actions
andrasa x
(I use Rasa X in local mode & I was also trying to open this withcallback input
as it was shown in the tutorial but it didn’t work too). - After opening Rasa X I went into Talk to your bot and I copied ID conversation from there, then I opened another terminal to make post request. I was trying to 1) do this post request from the tutorial and 2) with post request from README.
In the first case, I got:
(env) PS E:\dev\project007\pro007> curl -H "Content-Type: application/json" -X POST -d \
Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Content-Type: application/json" value of type "System.String" to type "System.Collecti
ons.IDictionary".
At line:1 char:9
+ curl -H "Content-Type: application/json" -X POST -d \
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
(env) PS E:\dev\project007\pro007> '{"name": "EXTERNAL_dry_plant", "entities": {"plant": "Orchid"}}' \
At line:1 char:67
+ '{"name": "EXTERNAL_dry_plant", "entities": {"plant": "Orchid"}}' \
+ ~
Unexpected token '\' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
(env) PS E:\dev\project007\pro007> "http://localhost:5005/conversations/f220f0964bb1467d830c0f048cdec31c/trigger_intent?output_channel=latest"
http://localhost:5005/conversations/f220f0964bb1467d830c0f048cdec31c/trigger_intent?output_channel=latest
After clicking on the above link I saw:
In the second case I got:
(env) PS E:\dev\project007\pro007> curl -X POST http://localhost:5005/webhooks/callback/webhook \
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'X'.
At line:1 char:6
+ curl -X POST http://localhost:5005/webhooks/callback/webhook \
+ ~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
(env) PS E:\dev\project007\pro007> -d '{"sender": "tester", "message": "hello"}' \
-d : The term '-d' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was incl
uded, verify that the path is correct and try again.
At line:1 char:4
+ -d '{"sender": "tester", "message": "hello"}' \
+ ~~
+ CategoryInfo : ObjectNotFound: (-d:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(env) PS E:\dev\project007\pro007> -H "Content-type: application/json"
-H : The term '-H' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was incl
uded, verify that the path is correct and try again.
At line:1 char:4
+ -H "Content-type: application/json"
+ ~~
+ CategoryInfo : ObjectNotFound: (-H:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I will be grateful for help.