mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
set a more reasonable upper bound
This commit is contained in:
parent
bb0d1b97f6
commit
89bd67a028
1 changed files with 1 additions and 1 deletions
|
@ -638,7 +638,7 @@ func SchemaToGrammar(schema []byte) []byte {
|
|||
defer C.free(unsafe.Pointer(cStr))
|
||||
|
||||
// Allocate buffer for grammar based on schema length but with upper bound
|
||||
maxLen := min(1024*1024*1024, len(schema)*4)
|
||||
maxLen := min(1024*1024, len(schema)*4)
|
||||
buf := make([]byte, maxLen)
|
||||
|
||||
// Call C function to convert schema to grammar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue