FunctionMode

@Serializable(with = FunctionModeSerializer::class)
sealed interface FunctionMode

This interface determines how the model handles function calls.

There are several modes of operation:

  • Default: In this mode, the model does not invoke any function None or decides itself Auto on calling a function or responding directly to the end-user. This mode becomes default if any functions are specified.

  • Named: In this mode, the model will call a specific function, denoted by the name attribute.

Inheritors

Types

Link copied to clipboard
object Companion

Provides default function call modes.

Link copied to clipboard
value class Default(val value: String) : FunctionMode

Represents a function call mode. The value can be any string representing a specific function call mode.

Link copied to clipboard
@Serializable
data class Named(val name: String) : FunctionMode

Represents a named function call mode. The name indicates a specific function that the model will call.