MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / random_string

Function random_string

tools/server/server-common.cpp:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62//
63
64std::string random_string() {
65 static const std::string str("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
66
67 std::random_device rd;
68 std::mt19937 generator(rd());
69
70 std::string result(32, ' ');
71
72 for (int i = 0; i < 32; ++i) {
73 result[i] = str[generator() % str.size()];
74 }
75
76 return result;
77}
78
79std::string gen_chatcmplid() {
80 return "chatcmpl-" + random_string();

Callers 5

gen_chatcmplidFunction · 0.70
gen_tool_call_idFunction · 0.70
get_media_markerFunction · 0.70
task_result_stateMethod · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected