Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Appends per-tool input examples to the tool description. For providers that don't natively accept examples on tool definitions (most of them besides Anthropic), this lets the example pairs influence the model via the description text instead.

Link copied to clipboard
fun DefaultSettingsMiddleware(temperature: Float? = null, topP: Float? = null, topK: Int? = null, maxOutputTokens: Int? = null, stopSequences: List<String> = emptyList(), seed: Int? = null, tools: List<LanguageModelTool> = emptyList(), toolChoice: ToolChoice? = null, headers: Map<String, String> = emptyMap(), providerOptions: ProviderOptions = ProviderOptions.None, presencePenalty: Float? = null, frequencyPenalty: Float? = null, responseFormat: ResponseFormat = ResponseFormat.Text): LanguageModelMiddleware

Applies default per-call settings to every model invocation. Explicitly provided params override defaults; provider option maps are merged.

Link copied to clipboard
Link copied to clipboard
fun ExtractReasoningMiddleware(tagName: String = "reasoning", separator: String = "", startWithReasoning: Boolean = false): LanguageModelMiddleware

Extracts XML-tagged reasoning sections from generated text and surfaces them as separate ReasoningStart/Delta/End events.

Link copied to clipboard
Link copied to clipboard