For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
Range
Range
class max.pipelines.context.Range(start, end)
Bases: object
Represents a range with start and end indices.
advance()
advance()
Advance the range to the next token.
-
Return type:
-
None
bump_end()
bump_end(amount)
Bump the end index by the given amount.
-
Parameters:
-
amount (int) – The amount to bump the end index by.
-
Return type:
-
None
bump_start()
bump_start(amount)
Bump the start index by the given amount.
-
Parameters:
-
amount (int) – The amount to bump the start index by.
-
Raises:
-
ValueError – If the new start index would exceed the end index.
-
Return type:
-
None
end
end: int
start
start: int