Tinkex.Types.ImageAssetPointerChunk (Tinkex v0.3.4)

View Source

Reference to a pre-uploaded image asset.

Mirrors Python tinker.types.ImageAssetPointerChunk.

CRITICAL: Field name is location, NOT asset_id.

The expected_tokens field is advisory. The backend computes the real token count and will reject mismatches. Calling length/1 will raise if expected_tokens is nil.

Summary

Functions

Get the length (number of tokens) consumed by this image reference.

Types

format()

@type format() :: :png | :jpeg

t()

@type t() :: %Tinkex.Types.ImageAssetPointerChunk{
  expected_tokens: non_neg_integer() | nil,
  format: format(),
  location: String.t(),
  type: String.t()
}

Functions

length(image_asset_pointer_chunk)

@spec length(t()) :: non_neg_integer()

Get the length (number of tokens) consumed by this image reference.