diff --git a/internal/llm/client.go b/internal/llm/client.go index e8293cc..c5a60c5 100644 --- a/internal/llm/client.go +++ b/internal/llm/client.go @@ -129,6 +129,11 @@ type Req struct { RepeatPenalty float64 // Stop — sequences that end generation early (e.g. newline for a one-liner). Stop []string + // Temperature — 0 (the zero value) is greedy decoding, and greedy is what + // every caller here wanted before this field existed. It is set only by the + // phraser, whose own transport has always sampled at 0.7: routing a phrasing + // call through this client must not quietly change how it decodes. + Temperature float64 } type msg struct { @@ -176,7 +181,7 @@ func (c *Client) Complete(ctx context.Context, r Req) (string, error) { Messages: []msg{{Role: "system", Content: r.System}, {Role: "user", Content: r.User}}, MaxTokens: r.MaxTokens, Grammar: r.Grammar, - Temp: 0, + Temp: r.Temperature, RepeatPenalty: r.RepeatPenalty, Stop: r.Stop, })