go-skynet / go-llama.cpp

LLama.cpp golang bindings
MIT License
626 stars 78 forks source link

Fix Stopwords/Antiprompt #248

Closed 65a closed 9 months ago

65a commented 9 months ago

The original break was breaking out of the inner for loop, but not the outer while loop. Repurpose (?) the existing unused variable is_antiprompt to terminate the while loop if any antiprompt was found. We can still break out of the for loop, since we already found one antiprompt, finding others is not useful. Fixes #183

65a commented 9 months ago

This also silences an unused variable warning, so I assume this was always the intent at some point.