Table of Contents

Method WithFallback

Namespace
MailFathom.AI.Chat
Assembly
MailFathom.AI.dll

WithFallback(ChatGenerationPlan)

Builds the same plan with a further model behind it.

public ChatGenerationPlan WithFallback(ChatGenerationPlan fallback)

Parameters

fallback ChatGenerationPlan

The model a call this one could not have answered is attempted against, carrying whatever stands behind it in turn.

Returns

ChatGenerationPlan

The plan carrying the fallback.

Remarks

Separate from Create(ChatEndpoint, int, float?, float?, string?, int, int, int, TimeSpan, IReadOnlyDictionary<string, JsonElement>?) rather than a tenth parameter on it, because a fallback is chosen by the reference that names the model rather than declared by the model, and every caller that builds a plan from one declaration alone would otherwise have to say it has none.

Exceptions

ArgumentNullException

Thrown when fallback is null.

ArgumentException

Thrown when the fallback names an endpoint already in this chain, or would make the chain longer than GreatestChainLength.