mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-10-23 00:50:47 +00:00
Provide a busy indicator if we're processing a long prompt and make the
stop button work in the middle of processing a long prompt as well.
This commit is contained in:
3
gptj.cpp
3
gptj.cpp
@@ -707,6 +707,9 @@ void GPTJ::prompt(const std::string &prompt, std::function<bool(const std::strin
|
||||
std::cerr << "GPT-J ERROR: Failed to process prompt\n";
|
||||
return;
|
||||
}
|
||||
// We pass a null string to see if the user has asked us to stop...
|
||||
if (!response(""))
|
||||
return;
|
||||
ctx.n_past += batch.size();
|
||||
i = batch_end;
|
||||
}
|
||||
|
Reference in New Issue
Block a user