Table of Contents

Method AddImageAttachmentDescription

Namespace
MailFathom.AI
Assembly
MailFathom.AI.dll

AddImageAttachmentDescription(IServiceCollection, long?)

Registers the one way an image attachment becomes text, in whichever of its two states the deployment is in.

public static IServiceCollection AddImageAttachmentDescription(this IServiceCollection services, long? maximumPixelCount)

Parameters

services IServiceCollection

The service collection to add to.

maximumPixelCount long?

The largest pixel grid an image may declare and still be sent, ignored where the deployment describes nothing.

Returns

IServiceCollection

The same service collection, so registration reads as one expression.

Remarks

Called unconditionally and always registering something, which is the difference from every other call here. The port answers with a reason rather than with an absence, so a caller records why an attachment produced no description without knowing what a deployment declared — and the reason a deployment that turned nothing on gives is the one an operator would recognize as their own decision.

Which of the two is registered is decided once, at composition. An instance that has not activated image description never resolves a chat client, never opens a transport, and never buffers an attachment: the activation is a registration rather than a branch inside a call, so there is no path by which a picture leaves an instance whose operator did not ask for it.

Scoped when it is active, because it sends over the scoped chat client and a background run makes one scope per message. The inactive one is a singleton holding nothing.

Exceptions

ArgumentNullException

Thrown when services is null.

ArgumentOutOfRangeException

Thrown when maximumPixelCount is not positive.