Table of Contents

Method WarmUpChatAtStartup

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

WarmUpChatAtStartup(EdgeBuilder, string?)

Order 420. Loads the model through IChatModelHost.PreloadAsync, probes the chat template, and probes guidance when the policy is not Disabled. Off by default: it forces provisioning. It runs no generation - one token on a 1B model is 30 ms of decode on top of a 1.6 s load, and nothing about the decode loop is proven by doing it twice.

Idempotent per registration, made so by scanning the IServiceCollection for a marker record - not TryAddEnumerable, which on an enumerable service like IEdgeStartupTask would suppress every other package's task rather than a duplicate of this one. Sub-project 2's WarmUpSessionAtStartup registers with a bare AddSingleton and gets duplicate order-220 tasks when called twice; sub-project 4 does not repeat that.

public static EdgeBuilder WarmUpChatAtStartup(this EdgeBuilder builder, string? name = null)

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

name string

The registration's service key, or null for the unkeyed one.

Returns

EdgeBuilder

The same builder.

Exceptions

ArgumentNullException

builder is null.