Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Sending Context Information #1

Open
ginccc opened this issue Sep 25, 2017 · 2 comments
Open

Sending Context Information #1

ginccc opened this issue Sep 25, 2017 · 2 comments

Comments

@ginccc
Copy link

ginccc commented Sep 25, 2017

Hi there,

awesome project, loved it when I saw it at the AI Summit.
As mentioned there, it would be support awesome if stuff could be send to a bot, that is technically not a user input.
I am the lead developer for EDDI (http://github.com/labsai/EDDI); with it, it is possible to hand over context information as String, JSON or Expressions (syntax aware String representing semantics)
I would write an adapted to EDDI, but would need a possibility to define the context values in the script.

Example of such context information:

type String; Key: firstTimeLogin Value: true
type JSON; Key: userInfo Value: {'username':'John'}

Cheers,
Gregor

@lingz
Copy link
Contributor

lingz commented Sep 25, 2017

Hi Gregor,

We do the same thing at Aiden. What we do is we have special developer commands such as __login_as, which are hardcoded regexes where we can pass the state of the user before the test. We just put them at the top of the test file, so this could be one option. This has been fine in our case.

Another option which is closer to what you are meaning I believe is to have some kind of option in the test file itself which is like Context, where you specify a JSON, and we send this over some side channel. This would mean adding a method to the ClientInterface class such as sendMetadata.

The first option is enough for us at Aiden, but if you think the second one might work better in your case, it would be awesome to fork it and merge that feature back in. My intuition is that it should be quite an easy patch, and I can help you if needed.

@ginccc
Copy link
Author

ginccc commented Sep 25, 2017

probably the second option would be better, but in our case we would send it in the same channel as the input, just differently tagged such as:

{'input':'someUserInput', :context':{'someKey':'someValue'}}

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

No branches or pull requests

2 participants