found this one on the floor

This commit is contained in:
anzz1 2023-03-28 15:49:40 +03:00 committed by GitHub
parent 021bdf237a
commit fcabe9b8b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,6 +350,7 @@ int main(int argc, char ** argv) {
last_output += llama_token_to_str(ctx, id);
}
is_antiprompt = false;
// Check if each of the reverse prompts appears at the end of the output.
for (std::string & antiprompt : params.antiprompt) {
if (last_output.find(antiprompt.c_str(), last_output.length() - antiprompt.length(), antiprompt.length()) != std::string::npos) {