| 1329 | common_init_result::~common_init_result() = default; |
| 1330 | |
| 1331 | std::string get_model_endpoint() { |
| 1332 | const char * model_endpoint_env = getenv("MODEL_ENDPOINT"); |
| 1333 | // We still respect the use of environment-variable "HF_ENDPOINT" for backward-compatibility. |
| 1334 | const char * hf_endpoint_env = getenv("HF_ENDPOINT"); |
| 1335 | const char * endpoint_env = model_endpoint_env ? model_endpoint_env : hf_endpoint_env; |
| 1336 | std::string model_endpoint = "https://huggingface.co/"; |
| 1337 | if (endpoint_env) { |
| 1338 | model_endpoint = endpoint_env; |
| 1339 | if (model_endpoint.back() != '/') { |
| 1340 | model_endpoint += '/'; |
| 1341 | } |
| 1342 | } |
| 1343 | return model_endpoint; |
| 1344 | } |
| 1345 | |
| 1346 | void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) { |
| 1347 | llama_clear_adapter_lora(ctx); |
no outgoing calls
no test coverage detected