ContextWindow.fits()

Check whether text fits within the input budget.

Usage

Source

ContextWindow.fits(text)

Parameters

text: str
Text to check.

Returns

bool
True if token count is within budget.