| 1054 | } |
| 1055 | |
| 1056 | std::string get_model_endpoint() { |
| 1057 | const char * model_endpoint_env = getenv("MODEL_ENDPOINT"); |
| 1058 | // We still respect the use of environment-variable "HF_ENDPOINT" for backward-compatibility. |
| 1059 | const char * hf_endpoint_env = getenv("HF_ENDPOINT"); |
| 1060 | const char * endpoint_env = model_endpoint_env ? model_endpoint_env : hf_endpoint_env; |
| 1061 | std::string model_endpoint = "https://huggingface.co/"; |
| 1062 | if (endpoint_env) { |
| 1063 | model_endpoint = endpoint_env; |
| 1064 | if (model_endpoint.back() != '/') model_endpoint += '/'; |
| 1065 | } |
| 1066 | return model_endpoint; |
| 1067 | } |
| 1068 | |
| 1069 | void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) { |
| 1070 | llama_clear_adapter_lora(ctx); |
no outgoing calls
no test coverage detected