Connection
Base URL, credentials and a reachable server.
Trace each channel from its eight-bit input to its packed bit field, making the discarded low bits visible before a buffer writer uses the result.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def rgb565(red, green, blue):
if any(type(v) is not int or not 0 <= v <= 255
for v in (red, green, blue)):
raise ValueError("eight-bit channels required")
return ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3)