mirror of
https://github.com/ollama/ollama.git
synced 2025-05-10 18:06:33 +02:00
ollamarunner: Use correct constant to remove cache entries
The correct constant to remove all entries to the end of the sequence for the Ollama engine is math.MaxInt32. -1 is used by the old engine. The impact of this is currently minimal because it would only occur in situations that are not supported by the implemented models or rarely used options.
This commit is contained in:
parent
3098c8b29b
commit
3d9498a425
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ func (c *InputCache) ShiftCacheSlot(slot *InputCacheSlot, numKeep int32) error {
|
|||
copy(newInputs[numKeep:], slot.Inputs[numKeep+discard:])
|
||||
|
||||
// Reset the cache
|
||||
_ = c.cache.Remove(slot.Id, 0, -1)
|
||||
_ = c.cache.Remove(slot.Id, 0, math.MaxInt32)
|
||||
slot.Inputs = []input.Input{}
|
||||
|
||||
// Return error with inputs that need to be reprocessed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue