mirror of
https://github.com/ollama/ollama.git
synced 2025-11-18 15:47:07 +01:00
use max scan token size to hold large objects
This commit is contained in:
@@ -24,6 +24,7 @@ func Parse(reader io.Reader) ([]Command, error) {
|
|||||||
var command, modelCommand Command
|
var command, modelCommand Command
|
||||||
|
|
||||||
scanner := bufio.NewScanner(reader)
|
scanner := bufio.NewScanner(reader)
|
||||||
|
scanner.Buffer(make([]byte, 0, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize)
|
||||||
scanner.Split(scanModelfile)
|
scanner.Split(scanModelfile)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Bytes()
|
line := scanner.Bytes()
|
||||||
|
|||||||
Reference in New Issue
Block a user