Expand description
Bounds on how much a tool call may hand back, so that no tool can produce an output the conversation cannot store.
chatbot_conversation_message_tool_outputs.output is VARCHAR(131072), and record_tool_call
writes the call and its output in one transaction: an oversized output does not degrade the
answer, it rolls the call back and ends the turn. truncate_tool_output is the backstop that
makes that unreachable; CappedList is what tools use so the backstop rarely has to fire.
Structsยง
- Capped
List ๐ - A list a tool caps before serializing it, so one long list cannot crowd out the fields beside it and so the model is never handed a partial list that looks complete.
- List
Truncation ๐ - How much of a list was left out of a tool output.
Constantsยง
- MAX_
TOOL_ ๐OUTPUT_ BYTES - The most a single tool output may carry, wrapper and instructions included.
- TRUNCATION_
INSTRUCTION ๐ - What a truncated tool output leaves out, phrased for the model rather than for a log.
Functionsยง
- truncate_
tool_ ๐output - Cuts
outputdown to what a tool output row can hold, returning the text to send and, when it had to cut, the instruction telling the model what it is looking at.