Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule and Variable Management #17

Open
aladagemre opened this issue Jan 9, 2016 · 1 comment
Open

Rule and Variable Management #17

aladagemre opened this issue Jan 9, 2016 · 1 comment

Comments

@aladagemre
Copy link

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.

@daffl
Copy link
Member

daffl commented Jan 9, 2016

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants