From 454559319e679d85d4baff35664a41d02192df9e Mon Sep 17 00:00:00 2001 From: marcus-daily <111281783+marcus-daily@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:43:30 +0100 Subject: [PATCH] Mark LLMHelper callbacks as open --- rtvi-client-android/build.gradle.kts | 2 +- .../src/main/java/ai/rtvi/client/helper/LLMHelper.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtvi-client-android/build.gradle.kts b/rtvi-client-android/build.gradle.kts index 2ee6d0a..60da505 100644 --- a/rtvi-client-android/build.gradle.kts +++ b/rtvi-client-android/build.gradle.kts @@ -60,7 +60,7 @@ publishing { register("release") { groupId = "ai.rtvi" artifactId = "client" - version = "0.1.2" + version = "0.1.3" pom { name.set("RTVI Client") diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt b/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt index bea3fe8..6f5d6f3 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt +++ b/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt @@ -30,7 +30,7 @@ class LLMHelper(private val callbacks: Callbacks) : VoiceClientHelper() { } abstract class Callbacks { - fun onLLMJsonCompletion(jsonString: String) {} + open fun onLLMJsonCompletion(jsonString: String) {} /** * Invoked when the LLM attempts to invoke a function. The provided callback must be @@ -39,7 +39,7 @@ class LLMHelper(private val callbacks: Callbacks) : VoiceClientHelper() { * @param func Details of the function call * @param onResult Invoke this callback to provide a return value to the LLM */ - fun onLLMFunctionCall(func: LLMFunctionCall, onResult: (Value) -> Unit) { + open fun onLLMFunctionCall(func: LLMFunctionCall, onResult: (Value) -> Unit) { onResult(Value.Object("error" to Value.Str("no handler registered"))) } }