Creates an instance of InteractionManager.
The sandai iframe element for interaction.
Cleans up all registered message event listeners previously added by _listenForMessage.
Call this method when the instance is being destroyed or no longer needs to listen to messages.
Sends a message to make the character respond using the built-in LLM, and waits for a response.
The message content the model responds to.
Optionalcontext: stringOptional context for the model.
Resolves with the model's response.
Sends a message to make the character say something, and waits until speech has started.
The message content to be spoken.
Resolves when the iframe signals that speech has started.
Sends a message to make the character stop speaking, and waits until speech has actually stopped.
Resolves when the iframe signals that speech has stopped.
Manages interactions with the sandai iframe, including sending and stopping speech messages.