CompletionConfig

data class CompletionConfig(val temperature: Double = DEFAULT_TEMPERATURE, val numCtx: Int = DEFAULT_NUM_CTX, val maxTokens: Int = DEFAULT_MAX_TOKENS, val numPredict: Int = DEFAULT_NUM_PREDICT, val reasoningEffort: ReasoningEffort? = null, val maxToolIterations: Int? = DEFAULT_MAX_TOOL_ITERATIONS, val responseFormat: ResponseFormat? = null)

Configuration for LLM completion requests.

Provides a unified, immutable configuration value across providers. Mirrors mojentic.llm.completion_config.CompletionConfig in the Python reference.

Constructors

Link copied to clipboard
constructor(temperature: Double = DEFAULT_TEMPERATURE, numCtx: Int = DEFAULT_NUM_CTX, maxTokens: Int = DEFAULT_MAX_TOKENS, numPredict: Int = DEFAULT_NUM_PREDICT, reasoningEffort: ReasoningEffort? = null, maxToolIterations: Int? = DEFAULT_MAX_TOOL_ITERATIONS, responseFormat: ResponseFormat? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Maximum tokens to generate in the response.

Link copied to clipboard

Optional ceiling on broker tool-recursion depth; null is unlimited.

Link copied to clipboard
val numCtx: Int

Context window size in tokens.

Link copied to clipboard

Tokens to predict, -1 for no limit. Ollama-specific knob.

Link copied to clipboard

Optional reasoning effort for thinking-capable models.

Link copied to clipboard

Optional output format forwarded by gateways in streaming and non-streaming requests. Null keeps the provider default. See ResponseFormat.

Link copied to clipboard

Sampling temperature. Higher values produce more random output.