mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-12 00:37:04 +00:00
allow specifying stop conditions in modelfile
This commit is contained in:
@@ -246,7 +246,7 @@ func (llm *LLM) Predict(ctx []int, prompt string, fn func(api.GenerateResponse))
|
||||
}
|
||||
|
||||
func (llm *LLM) checkStopConditions(b bytes.Buffer) error {
|
||||
for _, stopCondition := range llm.StopConditions {
|
||||
for _, stopCondition := range llm.Stop {
|
||||
if stopCondition == b.String() {
|
||||
return io.EOF
|
||||
} else if strings.HasPrefix(stopCondition, b.String()) {
|
||||
|
||||
Reference in New Issue
Block a user