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