minecraft-saar / infrastructure

Infrastructure for connecting a Minecraft server to NLG systems
https://minecraft-saar.github.io
2 stars 1 forks source link

Allow chat from user to architect #18

Open alexanderkoller opened 4 years ago

alexanderkoller commented 4 years ago

Let's think about allowing the user to send messages to the architect. This would allow Architects to act as (written) dialogue systems instead of just as NLG systems, as suggested by David Traum at Sigdial 2020.

Messages could just be logged passed on through the Broker. The Architect could simply receive a new callback method, which might even get a nop implementation in the abstract base class because most Architects don't do NLU.

There is a potential conflict with #15 which we should consider carefully.

akoehn commented 4 years ago

I am pretty sure that chat messages are not shown to other users. We also already forward all text messages by the user to the broker, the only thing left is forwarding this to the architect.

alexanderkoller commented 4 years ago

I think Julia's point in #15 was that one connected user might be able to send direct chat mesages to another user (by name).

Sounds like this would actually be quite easy. Maybe a project for Christine or Lara?

akoehn commented 4 years ago

Sure.

ca-schaefer commented 4 years ago

Implementation on branch https://github.com/minecraft-saar/infrastructure/tree/textmessages. Tested with DummyArchitect (that sends the text messages back) and SimpleArchitect with new Architect version as dependency (that ignores the text messages).

On the server:

[14:06:43 ERROR]: [de.saar.minecraft.communication.MinecraftClient] io.grpc.StatusRuntimeException: UNKNOWN

In the broker:

14:14:10.780 [grpc-default-executor-5] ERROR de.saar.minecraft.broker.Broker - handle text message null
Exception in thread "Thread-4" java.lang.IllegalStateException: Stream is already completed, no further calls are allowed
        at com.google.common.base.Preconditions.checkState(Preconditions.java:511)
        at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:346)
        at de.saar.minecraft.broker.DelegatingStreamObserver.onNext(DelegatingStreamObserver.java:36)
        at de.saar.minecraft.broker.Questionnaire.sendText(Questionnaire.java:129)
        at de.saar.minecraft.broker.Questionnaire$AnswerThread.run(Questionnaire.java:111)

As the broker catches the error and forwards to the Minecraft Plugin that logs it to the console, the system keeps running when the error occurs and later experiments are not effected.