Open aladagemre opened 8 years ago
There definitely will be more documentation, soon but you can already list and modify all the actions with a REST client like Postman at http://localhost:9090/actions when the app is running. Of course it is not the most user friendly so I'd be interested to discuss what would be a good interface to work with actions.
The only global variable currently available on the client is sam
which is an instance of https://github.com/mysamai/mysam-frontend/blob/master/sam/sam.js. For example you can run a text classification in the console with sam.classify('I need some help')
. Actions will also get this object, for example like https://github.com/mysamai/mysam-frontend/blob/master/sam/actions/actions.js#L42. This is where it shows the help and the user name.
I hope that helps a little. I'm currently wrapping up some other projects (that Sam actually depends on) and then will spend some serious time on usability and documentation here :)
Great work! Thanks for your efforts.
I wonder if there is a way to unset the rules set mistakenly, list the rules, modify them.
Also listing the potential global variables would be great. For example Sam can't answer who am i. So I would like to say "You are {{myname}}". But I don't know which variable to use.