Intercepting Player-to-Character Messages

Hello, I have a bit of a borderline use case. I’m trying to intercept the player-to-character messages (sent via voice/chat ui) to pre-process them before they get sent to the convAI API.

Is there any easy way to add this functionality without either editing or rewriting the core Unity plugin classes?

Hello @massimo.zancanaro,

Welcome to the Convai Developer Forum!

Could you please share a bit more detail about your use case?

Hi, thanks for the quick reply.

I’m trying to intercept the player-to-character messages to perform a set of language processing tasks on their content (sentiment analysis, to give an example), update a set of game state variables, and only then pass the player message to the convAI API.

I know this may add significant latency, but I need a more flexible solution than the one provided by the NarrativeDesign module.