Skip to main content

Module common

Module common 

Source
Expand description

Shared input validation, header utilities, and service-readiness helpers used by all handlers.

Structsยง

XHeaders ๐Ÿ”’
A sorted map of X-* HTTP request headers.

Constantsยง

MAX_STRING_CHARS ๐Ÿ”’
Maximum characters allowed per individual input string (SEC-3).

Functionsยง

check_ready ๐Ÿ”’
Checks whether the service is ready to handle embedding requests.
collect_x_headers ๐Ÿ”’
Collects all headers whose name starts with x- (case-insensitive) into an XHeaders map.
validate_input ๐Ÿ”’
Validates a batch of input texts against size and length constraints.