Make the communication between the AI server and the guidance engine asynchronous
Acceptance criteria
[ ] use the AlkemioVIrtualContributorEngine package for the guidance engine
[ ] store guidance chats in Matrix in a special room of type guidance
we can't wait for the response from sending a message to the guidance engine and keep the chat only in memory fin the frontend
when a user sends a message to the guidance engine a particular room of type guidance with name ${user.communicationID-guidance is created, and the whole conversation is kept there
the user can recreate the room, i.e. reset the chat, but by default, the conversation will persist between page refreshes
this will make the guidance engine work in the standard flow we use for the rest of the chat-style interactions with engines we have
we still need to keep sending the message through a special mutation resolver as it needs to handle guidance room creation/reset - the rest is standard communication flow. (subscribe to roomEvents, read the messages from the lookup room...)
The room will be retrieved from the user entity, a field called guidanceRoom that can be null if the room has never been used or has been resetted, or can have a normal Room entity if it has messages.
The first message Hi, this is Alkemio’s automated guidance chat. It can provide you with answers based on Alkemio’s documentation. What are you looking for? will never be in the matrix room, it is added artificially by the client in the user's language at the beginning of the conversation.
The reset chat command in the widget window will delete the room
[ ] a VC of type guidance should be created and a setting to the Platform entity for it should be added
Description
Make the communication between the AI server and the guidance engine asynchronous
Acceptance criteria
guidance
guidance
with name${user.communicationID-guidance
is created, and the whole conversation is kept thereroomEvents
, read the messages from the lookuproom
...)user
entity, a field calledguidanceRoom
that can be null if the room has never been used or has been resetted, or can have a normalRoom
entity if it has messages.Hi, this is Alkemio’s automated guidance chat. It can provide you with answers based on Alkemio’s documentation. What are you looking for?
will never be in the matrix room, it is added artificially by the client in the user's language at the beginning of the conversation.guidance
should be created and a setting to the Platform entity for it should be added