jayeshdesai4520 / chatbot-ng-internal

MIT License
3 stars 0 forks source link

Incorrect implementation of session #21

Closed ram-g-athreya closed 3 years ago

ram-g-athreya commented 3 years ago

Currently when a user arrives the session is set in a global variable here. This can result in collisions, that is when multiple users come in at the same time there can be problems. Instead create a setSession function that takes the sessionId as argument and replicates the logic here

Perevalov commented 3 years ago

Some of our internal messages with @jayeshdesai4520

when you get this question via https://dbpediachatbot.herokuapp.com/question there is some global value returned (kbQuestion variable in the webhook). Consequently, you need to get rid of global kbQuestion. You should use https://webengineering.ins.hs-anhalt.de:43740/startquestionansweringwithtextquestion in your webhook instead of https://webengineering.ins.hs-anhalt.de:43740/gerbil-execute/. --> this will allow you to have a graph_id for question already in the webhook, then you will just pass this graph_id as a parameter for showgraph method in the RDF-viz. updategraphvalue should be eliminated completely

To get rid of global kbQuestion I suggest to save in the hashMap last question for the qanary intent for each user session

anbo-de commented 3 years ago

@ram-g-athreya Please check.

ram-g-athreya commented 3 years ago

This is finished