LLMParams

@Serializable
data class LLMParams(val temperature: Double? = null, val speculation: String? = null, val schema: LLMParams.Schema? = null, val toolChoice: LLMParams.ToolChoice? = null)(source)

Represents configuration parameters for controlling the behavior of a language model.

Constructors

Link copied to clipboard
constructor(temperature: Double? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null)

Types

Link copied to clipboard
@Serializable
sealed interface Schema

Represents a generic schema for structured data, defining a common contract for schemas. This is a sealed interface, enabling a restrictive set of implementations.

Link copied to clipboard
@Serializable
sealed class ToolChoice

Used to switch tool calling behavior of LLM

Properties

Link copied to clipboard
Link copied to clipboard
val speculation: String? = null

Reserved for speculative proposition of how result would look like, supported only by a number of models, but may greatly improve speed and accuracy of result. For example, in OpenAI that feature is called PredictedOutput

Link copied to clipboard
val temperature: Double? = null

A parameter to control the randomness in the output. Higher values encourage more diverse results, while lower values produce deterministically focused outputs. The value is optional and defaults to null.

Link copied to clipboard

Used to switch tool calling behavior of LLM.

Functions

Link copied to clipboard
fun default(default: LLMParams): LLMParams