MCPcopy Create free account
hub / github.com/alibaba/MNN / SendSseEvent

Function SendSseEvent

apps/mnncli/src/mnncli_server.cpp:109–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void SendSseEvent(httplib::DataSink& sink, const std::string& event, const json& data) {
110 std::string chunk = "event: " + event + "\n";
111 chunk += "data: " + data.dump() + "\n\n";
112 sink.os.write(chunk.c_str(), chunk.size());
113 sink.os.flush();
114}
115
116 const std::string getR1AssistantString(std::string assistant_content) {
117 std::size_t pos = assistant_content.find("</think>");

Callers 1

StartMethod · 0.85

Calls 5

dumpMethod · 0.45
writeMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected