MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / get_model_endpoint

Function get_model_endpoint

smallthinker/common/common.cpp:1056–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1054}
1055
1056std::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
1069void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) {
1070 llama_clear_adapter_lora(ctx);

Callers 3

huggingface_dlMethod · 0.85
common_get_hf_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected