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

Function get_environment

tools/server/server-models.cpp:126–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124#endif
125
126static std::vector<std::string> get_environment() {
127 std::vector<std::string> env;
128
129#ifdef _WIN32
130 LPWCH env_block = GetEnvironmentStringsW();
131 if (!env_block) {
132 return env;
133 }
134 for (LPWCH e = env_block; *e; e += wcslen(e) + 1) {
135 env.emplace_back(wide_to_utf8(e));
136 }
137 FreeEnvironmentStringsW(env_block);
138#else
139 if (environ == nullptr) {
140 return env;
141 }
142 for (char ** e = environ; *e != nullptr; e++) {
143 env.emplace_back(*e);
144 }
145#endif
146
147 return env;
148}
149
150void server_model_meta::update_args(common_preset_context & ctx_preset, std::string bin_path) {
151 // update params

Callers 1

server_modelsMethod · 0.85

Calls 1

wide_to_utf8Function · 0.85

Tested by

no test coverage detected