mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
use TrimPrefix instead of TrimLeft
This commit is contained in:
@@ -465,7 +465,7 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove leading spaces from prevConvo if present
|
// Remove leading spaces from prevConvo if present
|
||||||
prevConvo = strings.TrimLeft(prevConvo, " ")
|
prevConvo = strings.TrimPrefix(prevConvo, " ")
|
||||||
|
|
||||||
var nextContext strings.Builder
|
var nextContext strings.Builder
|
||||||
nextContext.WriteString(prevConvo)
|
nextContext.WriteString(prevConvo)
|
||||||
|
|||||||
Reference in New Issue
Block a user