Archi
Expert
Posts: 19
Joined: Wed May 03, 2017 11:13 pm

User concept is not initialized when user missing [SOLVED]

Sat Jun 03, 2017 7:51 am

It looks like user concept is not being loaded at all if user with given ID wasn't created at the time of loading SIML file.

This is inconvenient, as I need to remember all IDs of all users myself and create every single one of them before loading SIML files - it'd be much better if SimlBot automatically created those "dummy" users with given IDs and user concepts loaded on as-needed basis when loading, instead of skipping user concepts entirely.

This is because the whole objective of "parsing" is to avoid another "pre-parsing" of me to know which users I should create before actual parsing takes place. It'd be really nice if SimlBot handled that detail itself, otherwise developer needs another file with declared users to create or his own parser.

Thank you in advance for looking into this, I hope this is proper bug report and not necessarily intentional behaviour :).


Edit: Moved from Report Bugs and Issues to Features and Suggestions section.

User avatar
Fantom
Help & Support
Posts: 304
Joined: Fri Oct 25, 2013 9:20 pm

Re: User concept not being initialized when user missing

Sat Jun 03, 2017 8:34 am

This is intentional, as far as I can remember many developers chose to manually add in user ids for specific users in server-client config. Like storing data only for users who were registered via email or some other credentials.

If I am getting it right. You are suggesting that when a User attribute value is specified within <Concept> a new user must be created if a user with the provided id is non-existent?

I think this would be an interesting feature to add in. Probably we could provide an option as well to enable/disable auto user creation feature via a simple Configuration property. As we just have like 72 hours to spare before v2.1.0 is out I will forward this as a suggestion to the team today itself so it may get incorporated within v2.1.0.

Archi
Expert
Posts: 19
Joined: Wed May 03, 2017 11:13 pm

Re: User concept not being initialized when user missing

Sat Jun 03, 2017 8:37 am

FranzZ wrote:If I am getting it right. You are suggesting that when a User attribute value is specified within <Concept> a new user must be created if a user with the provided id is non-existent?

I think this would be an interesting feature to add in. Probably we could provide an option as well to enable/disable auto user creation feature via a simple Configuration property.
Yes, this is exactly what I'd be very happy to see, and it's even better idea to make it switchable via configuration than making it new default. This way every declared <Concept> with user will result in creating that user with given ID, if it doesn't exist yet of course (without a need of creating that user prior to adding SIML files).

Thank you a lot! :D

(Alternatively, you could make another property for <Concept> such as "CreateUser" that would accept true/false value specifying if such behaviour is wanted, with false being default - although I think that bot configuration is probably more appropriate)
Last edited by Archi on Sat Jun 03, 2017 8:45 am, edited 1 time in total.

JeffersonStack
Pro
Posts: 44
Joined: Fri Apr 05, 2013 1:20 am

Re: User concept not being initialized when user missing

Sat Jun 03, 2017 8:45 am

This one can be reproduced... the current version just checks if the user id inside the concept adapter exists or not...therefore the kb gets loaded into the default bot's graph if a user with the specified id is not pre-added.

by the way you guys are pretty fast! 8-) ima waiting for 2.1 stable version as syn bot beta already supports .net core which is what I am waiting for.

User avatar
Leslie
Lead Software Architect
Posts: 353
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: User concept not being initialized when user missing

Sat Jun 03, 2017 9:38 pm

@Archi Changes to the SIML specification at the moment isn't a viable option. The SIML specification team is very strict when it comes to verbosity. I second Frank's opinion.

I reckon sticking with the former KISS (Keep it Simple, Silly) option of creating a toggle property in Bot Configuration would be a better option as it would just take a couple lines of conditional code and wouldn't hamper any unit test.

When we added the AddSiml(IEnumerable<XDocument> simlDocuments) overload, we chose to leave the behavior as such. Being an intentional behavior and not a bug, I am moving this post to the Features and Suggestions section on your behalf. I hope you don't mind.

Your suggestion is much appreciated. I believe the team has already made some commits regarding this feature.

@FreakShow The wait will be over soon.

User avatar
Fantom
Help & Support
Posts: 304
Joined: Fri Oct 25, 2013 9:20 pm

Re: User concept not being initialized when user missing

Sat Jun 03, 2017 11:02 pm

The team has already listened to my request for the feature and it looks like they have added a commit. I have uploaded their complied version in NuGet under beta-006. Kindly check if the feature is working for you.

Archi
Expert
Posts: 19
Joined: Wed May 03, 2017 11:13 pm

Re: User concept not being initialized when user missing

Sun Jun 04, 2017 6:54 am

I checked it and it indeed works like a charm, as I expected! :)

I'm very grateful for this feature, I'd like to say big thanks to you and the entire team for what you're doing, it's a real pleasure to see feature requests being implemented that fast, much appreciated! :)

User avatar
Fantom
Help & Support
Posts: 304
Joined: Fri Oct 25, 2013 9:20 pm

Re: User concept not being initialized when user missing

Mon Jun 05, 2017 11:34 am

You are welcome ;)

Thanks to you too :) for suggesting this interesting feature and reporting back.

Return to “Feature Request and Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest