Connection
Base URL, credentials and a reachable server.
Compare different chunk boundaries with the whole input, check an empty stream and reject a non-byte chunk without modifying input buffers.
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.
from zlib import crc32
def checksum_chunks(chunks):
value = 0
for chunk in chunks:
if not isinstance(chunk, (bytes, bytearray, memoryview)):
raise ValueError("crc.bytes")
value = crc32(chunk, value)
return value & 0xffffffff
# CRC-32 is a checksum, not authentication or encryption.