mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-10-03 19:45:41 +00:00
fix streaming race condition
This commit is contained in:
parent
e3dd9daf97
commit
6085db16cf
4 changed files with 42 additions and 13 deletions
|
|
@ -263,17 +263,15 @@ extern "C"
|
|||
}
|
||||
|
||||
const char * new_token(int idx) {
|
||||
if (generated_tokens.size() <= idx || idx < 0) return nullptr;
|
||||
|
||||
return generated_tokens[idx].c_str();
|
||||
return gpttype_new_token(idx);
|
||||
}
|
||||
|
||||
int get_stream_count() {
|
||||
return generated_tokens.size();
|
||||
return gpttype_get_stream_count();
|
||||
}
|
||||
|
||||
bool has_finished() {
|
||||
return generation_finished;
|
||||
return generation_finished.load();
|
||||
}
|
||||
bool batch_generate_enabled() {
|
||||
return gpttype_batch_generate_enabled();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue