mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-12 00:37:04 +00:00
moved removal of leading space into Predict
This commit is contained in:
@@ -464,6 +464,11 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove first leading space from prevConvo if present
|
||||||
|
if len(prevConvo) > 0 && prevConvo[0] == ' ' {
|
||||||
|
prevConvo = prevConvo[1:]
|
||||||
|
}
|
||||||
|
|
||||||
var nextContext strings.Builder
|
var nextContext strings.Builder
|
||||||
nextContext.WriteString(prevConvo)
|
nextContext.WriteString(prevConvo)
|
||||||
nextContext.WriteString(prompt)
|
nextContext.WriteString(prompt)
|
||||||
|
|||||||
Reference in New Issue
Block a user