Giter VIP home page Giter VIP logo

rasa-node-action-server's People

Contributors

lukaszmoskwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rasa-node-action-server's Issues

about README (minor error) and documentation update proposal

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

change request: managing form actions

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:

  • I'd call define method with the alias on, maybe more js-idiomatic.
  • I'd add info for beginners on readme, about how to run stuff (rasa run actions, etc.)

Please close this issue if you want.
Thanks again
Giorgio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.