added extra endpoints for abort gen and polled streaming

This commit is contained in:
Concedo 2023-06-10 18:13:26 +08:00
parent 5bd9cef9fa
commit 43f7e40470
5 changed files with 63 additions and 25 deletions

View file

@ -20,13 +20,6 @@
#include "expose.h"
#include "model_adapter.cpp"
std::string executable_path = "";
std::string lora_filename = "";
bool generation_finished;
std::vector<std::string> generated_tokens;
extern "C"
{
@ -225,4 +218,12 @@ extern "C"
bool has_finished() {
return generation_finished;
}
const char* get_pending_output() {
return gpttype_get_pending_output().c_str();
}
bool abort_generate() {
return gpttype_generate_abort();
}
}