MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get_model_endpoint

Function get_model_endpoint

subprojects/llama.cpp/common/common.cpp:1331–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1329common_init_result::~common_init_result() = default;
1330
1331std::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
1346void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) {
1347 llama_clear_adapter_lora(ctx);

Callers 3

common_get_hf_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected