LLMHelper

Helper for interacting with an LLM service.

Constructors

Link copied to clipboard
constructor(callbacks: LLMHelper.Callbacks)

Types

Link copied to clipboard
abstract class Callbacks
Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun appendToMessages(message: LLMContextMessage, runImmediately: Boolean = false): Future<Unit, VoiceError>

Append a new message to the LLM context.

Link copied to clipboard

Returns the bot's current LLM context. Bot must be in the ready state.

Link copied to clipboard
open override fun getMessageTypes(): Set<String>

Returns a list of message types supported by this helper. Messages received from the backend which have these types will be passed to handleMessage.

Link copied to clipboard
open override fun handleMessage(msg: MsgServerToClient)

Handle a message received from the backend.

Link copied to clipboard
fun run(interrupt: Boolean = false): Future<Unit, VoiceError>

Run the bot's current LLM context.

Link copied to clipboard
fun setContext(context: LLMContext, interrupt: Boolean = false): Future<Unit, VoiceError>

Update the bot's LLM context.