Table of Contents

Method Create

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

Create(ChatEndpoint, int, float?, float?, string?, int, int, int, TimeSpan, IReadOnlyDictionary<string, JsonElement>?)

Builds a plan, refusing a declaration no request could be made from.

public static ChatGenerationPlan Create(ChatEndpoint endpoint, int maximumOutputTokens, float? temperature, float? topP, string? reasoningEffort, int maximumMessagesPerRequest, int maximumRequestCharacters, int maximumRequestImageOctets, TimeSpan requestTimeout, IReadOnlyDictionary<string, JsonElement>? additionalProperties = null)

Parameters

endpoint ChatEndpoint

The endpoint every request is sent to.

maximumOutputTokens int

The greatest number of tokens one answer may occupy.

temperature float?

The sampling temperature, or null for the model's own default.

topP float?

The nucleus-sampling threshold, or null for the model's own default.

reasoningEffort string

The reasoning effort every call states, or null to send none.

maximumMessagesPerRequest int

The greatest number of turns one request carries.

maximumRequestCharacters int

The greatest number of characters those turns may add up to.

maximumRequestImageOctets int

The greatest number of octets the images of those turns may add up to, which zero states as an endpoint sent no image at all.

requestTimeout TimeSpan

The time one request may take.

additionalProperties IReadOnlyDictionary<string, JsonElement>

The request members every call carries beside the ones this deployment writes, or null for none.

Returns

ChatGenerationPlan

The plan.

Exceptions

ArgumentNullException

Thrown when endpoint is null.

ArgumentException

Thrown when the endpoint declares a blank alias or a blank routed model name, or when an additional property is misnamed, names a member this deployment owns, or exceeds GreatestAdditionalPropertyCount.

ArgumentOutOfRangeException

Thrown when a bound other than maximumRequestImageOctets is not positive, when that one is negative, when a sampling parameter is outside the range every provider accepts, or when the endpoint's API or the reasoning effort names no declared value.