Skip to content

Commit

Permalink
Quick fix for JS build
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Nov 4, 2024
1 parent ae68051 commit 2109744
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/commonMain/kotlin/tool/Tools.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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,
Expand All @@ -50,7 +48,6 @@ internal data class DefaultTool(
) : Tool()

@Serializable
@OptIn(ExperimentalSerializationApi::class)
abstract class BuiltInTool(
override val name: String,
val type: String,
Expand All @@ -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? = {}

Expand All @@ -95,7 +92,6 @@ abstract class ToolInput() {

}

@OptIn(ExperimentalSerializationApi::class)
inline fun <reified T : ToolInput> toolName(): String = serializer<T>().name()

@OptIn(ExperimentalSerializationApi::class)
Expand Down

0 comments on commit 2109744

Please sign in to comment.