Browse Source

zero means zero

use a default of 1024 when asking for zero is confusing since most calls
seem to assume 0 means do not ready any data
drifkin/chat-truncation-fix
Michael Yang 1 year ago
committed by Michael Yang
parent
commit
8d376acc9b
  1. 4
      fs/ggml/ggml.go

4
fs/ggml/ggml.go

@ -366,10 +366,6 @@ func DetectContentType(b []byte) string {
// maxArraySize. If maxArraySize is 0, the default value of 1024 is used. If
// the maxArraySize is negative, all arrays are collected.
func Decode(rs io.ReadSeeker, maxArraySize int) (*GGML, int64, error) {
if maxArraySize == 0 {
maxArraySize = 1024
}
rs = bufioutil.NewBufferedSeeker(rs, 32<<10)
var magic uint32

Loading…
Cancel
Save