Discover Packages
github.com/nikolaydimitrov/ollama
server
internal
chunks
package
Version:
v0.0.0-...-e80cf58
Opens a new window with list of versions in this module.
Published: Mar 12, 2025
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Count returns the number of Chunks of size chunkSize needed to cover the
range [0, size).
Of returns a sequence of contiguous Chunks of size chunkSize that cover
the range [0, size), in order.
type Chunk struct {
Start, End int64
}
Parse parses a string in the form "start-end" and returns the Chunk.
ParseRange parses a string in the form "unit=range" where unit is a string
and range is a string in the form "start-end". It returns the unit and the
range as a Chunk.
Size returns end minus start plus one.
String returns the string representation of the Chunk in the form
"{start}-{end}".
Source Files
¶
Click to show internal directories.
Click to hide internal directories.