Skip to content

pipelex.input.prompt_too_large

A prompt's text and images together exceed what the model takes in one request

Type https://docs.pipelex.com/errors/pipelex.input.prompt_too_large
Family pipelex.input: Refusals of a run's input that name a fact no core code carries.
Domain input: the caller acts, by changing the request or its inputs
Retry no: repeating the operation fails the same way
HTTP status 422
Raised as a problem document, sent as the body of an HTTP response or kept in a run's record

What it means

Each of the prompt's images is within what the model reads, but the request that carries them all with the text is not, as TypeSafe's Jev models take one request of a bounded size; the prompt is refused before any request is sent, so nothing is spent.

What to do

Send fewer images, lighter ones or a shorter text, so the prompt weighs less than params.limit bytes, then run the method again.

Next steps

A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the caller, and the second for any other reader.

Reader Kind Detail
The domain's actor change_input Send fewer or lighter images, or a shorter text, then send the request again.
Any other reader change_input Pass this to the caller, whose images and text together exceed what the model '{model}' takes in one request.

Detail

The problem's detail is written from this template, filled with the occurrence's parameters:

The prompt for the model '{model}', its text and its images together, reaches {size} bytes, past the {limit} bytes the model takes in one request.

Parameters

Every parameter is present on every occurrence of the code.

Name Type Description
model identifier The model the prompt would be sent to.
size bytes What the prompt weighs, counted up to the image at which it passed the limit.
limit bytes The most the prompt may weigh in one request to the model.

See also