Only some engines read images. Every engine reads the text, numbers and attributes of a document the same way. A judgment reads an image only where its context recipe names it. An engine that does not read images gets the image’s digest in its place, and the evaluation says so. Each engine’s page has an Images row that says how many images the engine reads in one request, and the engines table shows which versions read images. An engine reads images when its
limits in GET /engines have images.Name images in a recipe
You do not send images to a judgment. You write them to documents, and the judgment’s context recipe names each image that it reads asimages.<name>. Choose an engine that reads images. This judgment reads each claim’s description and its photos:
POST /v1/namespaces/acme%2Fclaims/judgments
images.photos names the claim’s list of photos. The engine reads each image in the list, and the text of state.description. On an engine that reads no images, the same recipe works, but the engine gets each image’s digest in its place, and the create warns you.
A recipe can name images.<name> in these places:
- The recipe’s
fields, as above. previous.fields, to show the image that the last verdict saw beside the current one. See judge what changed.- A relation’s
fields, to read the images of related documents, such as the policy’s photo of the car when it was insured. - A relation’s
latestaggregate, to read the image of the newest related document that has one.
What an image path cannot do
An image path names a whole image, or a whole list. Brussle refuses these withinvalid_request:
max_charson an image path. An image is never cut.last_norwindowon an image path.- A path inside an image, such as
images.photo.width. sum,avg,min,maxor a band over an image.- An image in the
labelofoptions.from. A label is text. order.byon an image.- An image in
features, such asclaims.latest(images.photo). A feature is a number. The error’sdetails.pathnames the image path.
"use_context": "whole_state") reads state only, never images. A change to an image that the recipe does not name judges nothing again.
On an engine that reads no images
Create a judgment whose recipe names image paths on an engine that reads no images, and the response has a warning naming the paths, such asimages.photo, or images.photo of relation claims for a relation. Activating such a version warns again, with the code images_unread and the paths.
Brussle decides this from the definition alone, so the warning comes even when you create the judgment before you write any documents. Setting the namespace’s default_engine gives no warning.
What the evaluation shows
An evaluation’s context is keyed by path. It names each image by its reference, never by its bytes, so you can always see which images an answer read. Get each one that you did not erase withGET /namespaces/{ns}/images/{digest}.
images.<name>, previous.images.<name>, images.<name> in a relation’s records, and a relation’s latest(images.<name>). Everything else, state included, is JSON as you wrote it.
When the engine does not read an image, it reads the image’s digest instead, and the context shows {"digest": "sha256:e0db47...", "omitted": "..."} with one of three reasons:
engine_reads_no_images. The engine reads no images. This is not a cut, so it does not makecontext_truncatedtrue.over_the_limit. The engine reads images, but this one did not fit. A context holds at most 16 images. When a context is over its token limit, Brussle leaves out whole images before it cuts any text: the images of relations first, then those ofprevious, then those of the recipe’s own fields, from the last field. If the text alone is over the limit, Brussle leaves out every image and then cuts the text.context_truncatedis then true.erased. You erased the image before this judging. This does not makecontext_truncatedtrue.
What images cost
An image counts toward the judgment’s size class by its size in pixels, as text counts by its tokens. An engine reads an image in tiles of 32 × 32 pixels, each about one token. A photo of 1440 × 960 pixels is 45 × 30 tiles, or 1,350 tokens, plus about 10 tokens for the label that names its path. With a short record beside it, that is still a standard judgment. Two such photos are more than 2,000 tokens, so the judgment is large. To bound the cost, name fewer images in the recipe.- A full-size photo makes a large judgment. Brussle scales a large photo, such as one from a phone camera, to about 2,048 tiles, about 2,048 tokens. That alone is more than a standard judgment, so with any question the judgment is large and counts as 4. To keep a judgment standard, send photos of at most about 1,500 × 1,000 pixels, with a short record beside them.
- The engine’s weight applies. On gpt-6-luna, whose weight is 2.5, a standard judgment counts as 2.5 judgments, and a large one as 10.
- An image that the engine does not read costs only its digest, about 100 characters.
- A document whose read images and other read fields did not change is not judged again. Sending the same image again gives the same reference, so it changes nothing. When a field that the recipe reads changes, the engine reads the images again, and they count again.
- An estimate counts images as the bill does. It still counts an image that you erased, so it can be a little higher than the bill.
images one candidate field, images.<name>. On an engine that reads images, it keeps them only while the context stays a standard judgment. When it has to choose, it keeps the text and leaves out image names, the last one first, with the reason image, so it leaves out full-size photos. On an engine that reads no images, it leaves out each image name with the reason image. To judge full-size photos, name them in your recipe yourself, and do not copy the suggested max_tokens: a context over max_tokens leaves images out as over_the_limit.
Storage, writes and reads of images are billed as images in documents describes.