mirror of
https://github.com/zebrajr/ollama.git
synced 2025-12-06 12:19:56 +01:00
server: fix panic when runner.Options is nil (#10566)
This commit is contained in:
parent
913905028b
commit
1703d1472e
|
|
@ -691,11 +691,13 @@ func (runner *runnerRef) LogValue() slog.Value {
|
||||||
attrs = append(attrs,
|
attrs = append(attrs,
|
||||||
slog.String("size", format.HumanBytes2(runner.estimatedTotal)),
|
slog.String("size", format.HumanBytes2(runner.estimatedTotal)),
|
||||||
slog.String("vram", format.HumanBytes2(runner.estimatedVRAM)),
|
slog.String("vram", format.HumanBytes2(runner.estimatedVRAM)),
|
||||||
slog.Int("num_ctx", runner.NumCtx),
|
|
||||||
slog.Int("parallel", runner.numParallel),
|
slog.Int("parallel", runner.numParallel),
|
||||||
slog.Int("pid", runner.pid),
|
slog.Int("pid", runner.pid),
|
||||||
slog.String("model", runner.modelPath),
|
slog.String("model", runner.modelPath),
|
||||||
)
|
)
|
||||||
|
if runner.Options != nil {
|
||||||
|
attrs = append(attrs, slog.Int("num_ctx", runner.Options.NumCtx))
|
||||||
|
}
|
||||||
return slog.GroupValue(attrs...)
|
return slog.GroupValue(attrs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user