Unverified Commit 1703d147 authored by Jeffrey Morgan's avatar Jeffrey Morgan Committed by GitHub
Browse files

server: fix panic when runner.Options is nil (#10566)

parent 91390502
...@@ -691,11 +691,13 @@ func (runner *runnerRef) LogValue() slog.Value { ...@@ -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...)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment