use TrimPrefix instead of TrimLeft

This commit is contained in:
Arne Müller 2023-10-18 22:51:30 +02:00
parent ce6197a8e0
commit 730996e530

View file

@ -465,7 +465,7 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
}
// Remove leading spaces from prevConvo if present
prevConvo = strings.TrimLeft(prevConvo, " ")
prevConvo = strings.TrimPrefix(prevConvo, " ")
var nextContext strings.Builder
nextContext.WriteString(prevConvo)