From 2109744f53d5c2a2524c210dcd382343515dee42 Mon Sep 17 00:00:00 2001 From: Kazik Pogoda Date: Mon, 4 Nov 2024 11:58:42 +0100 Subject: [PATCH] Quick fix for JS build --- src/commonMain/kotlin/tool/Tools.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/commonMain/kotlin/tool/Tools.kt b/src/commonMain/kotlin/tool/Tools.kt index 7a40c6c..1aaecf1 100644 --- a/src/commonMain/kotlin/tool/Tools.kt +++ b/src/commonMain/kotlin/tool/Tools.kt @@ -15,7 +15,6 @@ import kotlinx.serialization.SerializationException import kotlinx.serialization.Transient import kotlinx.serialization.json.JsonClassDiscriminator import kotlinx.serialization.serializer -import java.lang.IllegalStateException @Serializable @JsonClassDiscriminator("name") @@ -39,7 +38,6 @@ abstract class Tool { @Serializable @PublishedApi -@OptIn(ExperimentalSerializationApi::class) internal data class DefaultTool( override val name: String, override val description: String? = null, @@ -50,7 +48,6 @@ internal data class DefaultTool( ) : Tool() @Serializable -@OptIn(ExperimentalSerializationApi::class) abstract class BuiltInTool( override val name: String, val type: String, @@ -68,7 +65,7 @@ abstract class BuiltInTool( * with a given tool use ID. The implementation of the [use] method should * contain the logic for executing the tool and returning the [ToolResult]. */ -abstract class ToolInput() { +abstract class ToolInput { private var block: suspend ToolResult.Builder.() -> Any? = {} @@ -95,7 +92,6 @@ abstract class ToolInput() { } -@OptIn(ExperimentalSerializationApi::class) inline fun toolName(): String = serializer().name() @OptIn(ExperimentalSerializationApi::class)