mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 20:05:20 +00:00
server: add data: [DONE] to /chat/completions stream response (#9459)
This commit is contained in:
@ -2993,6 +2993,8 @@ int main(int argc, char ** argv) {
|
||||
}, [&](json error_data) {
|
||||
server_sent_event(sink, "error", error_data);
|
||||
});
|
||||
static const std::string ev_done = "data: [DONE]\n\n";
|
||||
sink.write(ev_done.data(), ev_done.size());
|
||||
sink.done();
|
||||
return true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user