lukaszmoskwa / rasa-node-action-server Goto Github PK
View Code? Open in Web Editor NEWNodeJS alternative to Rasa SDK Action Server
License: MIT License
NodeJS alternative to Rasa SDK Action Server
License: MIT License
Hi,
To maintain topic coherence I'm moving in this new "issue" (just a proposal/note indeed).
In general, a README with a full running example could help users.
You could also just supply a domain.yml
and a README.md
in the directory of your example examples/http
: https://github.com/Lykos94/rasa-node-action-server/tree/master/examples/http
# file: domain.yml
version: "2.0"
config:
store_entities_as_slots: true
session_config:
session_expiration_time: 60 # value in minutes
carry_over_slots_to_new_session: true
nlu:
- intent: greet
examples: |
- Hi
- Hey!
- Hallo
- Good day
- Good morning
- intent: bye
examples: |
- Bye
- intent: ask_weather
examples: |
- what's the weather
- what's the weather in [Genoa](city)
- i want to know the [milan](city) weather of today
- i want to know the weather of today
- tell me the [Vienna](city) weather forecast
- hows the weather today
- intent: city_inform
examples: |
- milan
- Genoa
- rome
- Berlin
- Vienna
- Turin
- Naples
- london
- new york
- Dar Es Salaam
- Nairobi
- Mogadishu
intents:
- greet
- bye
- ask_weather
- city_inform
entities:
- city
slots:
city:
type: text
influence_conversation: true
responses:
utter_greet:
- text: "Hey there!"
utter_bye:
- text: "Bye!"
utter_ask_city:
- text: "which city you want to check for?"
- text: "which city?"
- text: "please tell me which city"
- text: "where? In which city?"
utter_default:
- text: "Sorry, I didn't get that, can you rephrase?"
actions:
- weather_city_today_action
stories:
# the entity city is specified in the intent ask_weather
- story: 1. greet and weather with city specified
steps:
- intent: greet
- action: utter_greet
- intent: ask_weather
- action: weather_city_today_action
- action: utter_bye
# the entity city is specified in the intent ask_weather
- story: 2. greet and weather with city NOT specified
steps:
- intent: greet
- action: utter_greet
- intent: ask_weather
- slot_was_set:
- city: None
- utter_ask_city
- city_inform
- action: weather_city_today_action
- action: utter_bye
# file: test_stories.yml
stories:
- story: 1. greet and weather with city specified
steps:
- user: |
hey
- action: utter_greet
- user: |
what's the weather in Milan?
- action: weather_city_today_action
- action: utter_bye
- story: 2. greet and weather with city NOT specified
steps:
- user: |
hey
- action: utter_greet
- user: |
what's the weather?
- utter_ask_city
- user: |
Genoa
- action: weather_city_today_action
- action: utter_bye
Please double check if syntax of the above example is formally correct and it make sense.
BTW, in the README.md paragraph https://github.com/Lykos94/rasa-node-action-server#rasa-custom-connectors, you state:
You can then test your server by running:
curl -XPOST http://localhost:5005/webhooks/rnc/webhook \
-H "Content-type: application/json" \
-d '{"sender": "lykos94", "message": "Hello bot", "metadata":{}}'
response:
[{"recipient_id":"lykos94","text":"Hello world, from your action server"}]
But
To test the action server example here: https://github.com/Lykos94/rasa-node-action-server/tree/master/examples/http:
I do believe that the POST request can not produce the response you mentioned.
Instead maybe you want something like this:
curl -XPOST http://localhost:5005/webhooks/rnc/webhook \
-H "Content-type: application/json" \
-d '{"sender": "lykos94", "message": "/ask_weather{\“city\”:\“Vienna\”}"}'
In general I'd suggest to write down in README a step-by-step sequence of cli commands.
Thanks for your patience
Hi Lukasz,
Thanks for this project!
This is not real issue, just a change request/proposal. Please labels it accordly, if you want.
Do you maybe foresee to implement also the RASA 2 form particular action management?
If I can I'll contribute, with maybe more examples, e.g. to set a slot to a value, etc.
Minor stuff:
rasa run actions
, etc.)Please close this issue if you want.
Thanks again
Giorgio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.