mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 09:57:01 +01:00
server/internal/chunks: remove chunks package (#9755)
This commit is contained in:
13
server/internal/cache/blob/chunked.go
vendored
13
server/internal/cache/blob/chunked.go
vendored
@@ -5,11 +5,18 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/ollama/ollama/server/internal/chunks"
|
||||
)
|
||||
|
||||
type Chunk = chunks.Chunk // TODO: move chunks here?
|
||||
// Chunk represents a range of bytes in a blob.
|
||||
type Chunk struct {
|
||||
Start int64
|
||||
End int64
|
||||
}
|
||||
|
||||
// Size returns end minus start plus one.
|
||||
func (c Chunk) Size() int64 {
|
||||
return c.End - c.Start + 1
|
||||
}
|
||||
|
||||
// Chunker writes to a blob in chunks.
|
||||
// Its zero value is invalid. Use [DiskCache.Chunked] to create a new Chunker.
|
||||
|
||||
Reference in New Issue
Block a user