class LittleGhost::Embeddings::Request
Carries the validated inputs and controls for one embedding operation.
LittleGhost builds this value for LittleGhost.embed and passes it to the selected provider. Provider implementations may receive calls concurrently. They must observe cancellation_token and deadline while performing external work.
Attributes
Token that stops the provider operation when cancellation is requested.
Monotonic deadline for the provider operation, or nil.
Frozen input strings in caller order.
Frozen input budgets applied before LittleGhost retains the strings.
Frozen model settings chosen by trusted application code.
Public Class Methods
# File lib/little_ghost/embeddings/request.rb, line 63
Validates and freezes one String or a nonempty Array of Strings.
settings contains trusted model settings. limits may override the input budgets:
:max_inputs-
Number of input strings. Defaults to 128.
:max_input_bytes-
Bytes allowed in one input. Defaults to 64 KiB.
:max_total_bytes-
Bytes allowed across all inputs. Defaults to 1 MiB.
Invalid shapes raise ArgumentError; inputs outside these budgets raise UnsupportedInputError.