mirror of
https://github.com/ollama/ollama.git
synced 2025-05-10 18:06:33 +02:00
server: fix panic when runner.Options is nil (#10566)
This commit is contained in:
parent
913905028b
commit
1703d1472e
1 changed files with 3 additions and 1 deletions
|
@ -691,11 +691,13 @@ func (runner *runnerRef) LogValue() slog.Value {
|
|||
attrs = append(attrs,
|
||||
slog.String("size", format.HumanBytes2(runner.estimatedTotal)),
|
||||
slog.String("vram", format.HumanBytes2(runner.estimatedVRAM)),
|
||||
slog.Int("num_ctx", runner.NumCtx),
|
||||
slog.Int("parallel", runner.numParallel),
|
||||
slog.Int("pid", runner.pid),
|
||||
slog.String("model", runner.modelPath),
|
||||
)
|
||||
if runner.Options != nil {
|
||||
attrs = append(attrs, slog.Int("num_ctx", runner.Options.NumCtx))
|
||||
}
|
||||
return slog.GroupValue(attrs...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue