mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-09-22 21:16:20 +00:00
docs: add server utils.hpp comment
Add a comment mentioning the requirement for server-sent events to end with 2 newlines.
This commit is contained in:
parent
c23bfc5000
commit
d2c0111da1
@ -296,7 +296,7 @@ static bool server_sent_event(httplib::DataSink & sink, const char * event, cons
|
||||
const std::string str =
|
||||
std::string(event) + ": " +
|
||||
data.dump(-1, ' ', false, json::error_handler_t::replace) +
|
||||
"\n\n"; // note: these newlines are important (not sure why though, if you know, add a comment to explain)
|
||||
"\n\n"; // The server-sent events standard requires each event to end with 2 newlines.
|
||||
|
||||
LOG_DBG("data stream, to_send: %s", str.c_str());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user