| 224 | } |
| 225 | |
| 226 | std::vector<std::string> common_arg::get_env() const { |
| 227 | std::vector<std::string> result; |
| 228 | if (env) { |
| 229 | result.push_back(std::string(env)); |
| 230 | } |
| 231 | if (!args_neg.empty() && env) { |
| 232 | // for compatibility, we need to add LLAMA_ARG_NO_ variant |
| 233 | std::string neg_env = env; |
| 234 | string_replace_all(neg_env, "LLAMA_ARG_", "LLAMA_ARG_NO_"); |
| 235 | result.push_back(neg_env); |
| 236 | } |
| 237 | return result; |
| 238 | } |
| 239 | |
| 240 | // |
| 241 | // utils |