Open art-from-the-machine opened 7 months ago
In the HTTP branch, the sentences are produced async and put into a queue. Every request to continue from the game simply returns the next sentence from that queue. Interrupting using HTTP should be as simple as:
The hardest part in all of this is to decide hoe to implement that on the games side, especially with VR
As a player, and as a Dragonborn, interrupting a NPC speaking inane opinions like some are wont to do, and giving them right now a piece of my mind, is an essential bit of roleplay :P
This section of code in
output_manager.py
allows the player to "interrupt" a radiant conversation and join in (turning it into a multi-NPC conversation):https://github.com/art-from-the-machine/Mantella/blob/94fdfba52e5be60ded5a8e7a96d3a63bc1ae560f/src/output_manager.py#L648C1-L653C46
A new line of communication can be created which indicates whether the player is attempting to interrupt the LLM's response at any point (and not just radiant conversations), and if so, end the response as shown in the code above. For example:
Note that this line of communication would also need to be added to the Mantella Spell. The method of communication will change once this HTTP PR is merged: https://github.com/art-from-the-machine/Mantella/pull/205. It is better to wait for this HTTP PR to be merged before working on this task to avoid rework.