An ImageProcessingClient over any vision-capable LLMClient (#3155): the image goes to the model as a ContentPart.Image beside the prompt, through the provider's own client, so the call honours its config, credentials, retries and tracing, and the result carries the provider's token usage.
The image's media type is read from its bytes; BMP and TIFF, which no vendor takes, are converted to PNG, and WebP is sent as it is. An image part is at most ContentPart.MaxInlineBytes (5 MiB): a larger file is refused before any call, so resize it first with preprocessImage or resizeImage.
A reply cut at the output limit (FinishReason.Length) is a ProcessingError: raise maxTokens in options. A reply with no text is a ServiceError (status 200). A filtered reply is the client's ContentFilteredError.
preprocessImage, convertFormat and resizeImage run locally, with no call.
Value parameters
llm
the client the image is sent through; its model must accept image input
local
the processor that reads, converts and transforms the image
options
the options of every call, for example CompletionOptions().withMaxTokens(4096)
The names of a fixed list of objects (person, car, dog, cat, building, tree, table, chair) that the model's reply mentions as whole words. Their confidence and bounding box are None: the reply is not parsed for them.
The names of a fixed list of objects (person, car, dog, cat, building, tree, table, chair) that the model's reply mentions as whole words. Their confidence and bounding box are None: the reply is not parsed for them.