Dm Image Probe
Probe whether a decisions-model judge reads image input.
A decisions model accepts any state, so a call that merely succeeds proves nothing. The probe instead asks the judge the color of solid-color squares and trusts it only when it names every one.
clear_cache()
Forget every cached probe verdict.
dm_reads_images(invoker, record_usage=None)
async
Check whether a decisions model reads image input, probing once per model id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
invoker
|
BaseDMInvoker
|
The decisions-model judge. |
required |
record_usage
|
Callable[[DMOutput], None] | None
|
Called with each probe output, to count its tokens. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the judge names the color of every probe image. |
solid_png(rgb)
Encode a solid-color square as PNG bytes, without an imaging dependency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rgb
|
tuple[int, int, int]
|
The square's color. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The PNG file content. |