package com.correx.core.talkie.model

import com.correx.core.context.model.TokenBudget
import com.correx.core.inference.GenerationConfig
import kotlinx.serialization.Serializable

@Serializable
data class TalkieConfig(
    val conversationKeepLast: Int = 6,
    val retrievalK: Int = 5,
    val tokenBudget: TokenBudget = TokenBudget(limit = 4096),
    val generationConfig: GenerationConfig = GenerationConfig(
        temperature = 0.7,
        topP = 0.9,
        maxTokens = 512,
    ),
    // Narration uses a larger token ceiling: reasoning models spend tokens "thinking"
    // before emitting content, and a tighter cap left no room for the actual line (the
    // response came back empty with finishReason=length). 1024 still wasn't enough —
    // the model burned the whole budget reasoning and emitted no content — so 4096
    // gives reasoning room to complete and still produce the one or two sentences.
    val narrationGenerationConfig: GenerationConfig = GenerationConfig(
        temperature = 0.7,
        topP = 0.9,
        maxTokens = 4096,
    ),
    val narrationModelId: String? = null,
)
