change function name
This commit is contained in:
parent
48de4da428
commit
7272c6fb99
2 changed files with 4 additions and 3 deletions
|
@ -2262,7 +2262,7 @@ static bool starts_with(const std::string & str, const std::string & prefix) {
|
||||||
return str.rfind(prefix, 0) == 0;
|
return str.rfind(prefix, 0) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool perform_with_retry(const std::string& url, CURL* curl, int max_attempts, int retry_delay_seconds) {
|
static bool curl_perform_with_retry(const std::string& url, CURL* curl, int max_attempts, int retry_delay_seconds) {
|
||||||
int remaining_attempts = max_attempts;
|
int remaining_attempts = max_attempts;
|
||||||
|
|
||||||
while (remaining_attempts > 0) {
|
while (remaining_attempts > 0) {
|
||||||
|
@ -2387,7 +2387,7 @@ static bool llama_download_file(const std::string & url, const std::string & pat
|
||||||
curl_easy_setopt(curl.get(), CURLOPT_HEADERFUNCTION, static_cast<CURLOPT_HEADERFUNCTION_PTR>(header_callback));
|
curl_easy_setopt(curl.get(), CURLOPT_HEADERFUNCTION, static_cast<CURLOPT_HEADERFUNCTION_PTR>(header_callback));
|
||||||
curl_easy_setopt(curl.get(), CURLOPT_HEADERDATA, &headers);
|
curl_easy_setopt(curl.get(), CURLOPT_HEADERDATA, &headers);
|
||||||
|
|
||||||
bool was_perform_successful = perform_with_retry(url, curl.get(), CURL_MAX_RETRY, CURL_RETRY_DELAY_SECONDS);
|
bool was_perform_successful = curl_perform_with_retry(url, curl.get(), CURL_MAX_RETRY, CURL_RETRY_DELAY_SECONDS);
|
||||||
if (!was_perform_successful) {
|
if (!was_perform_successful) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2465,7 +2465,7 @@ static bool llama_download_file(const std::string & url, const std::string & pat
|
||||||
// start the download
|
// start the download
|
||||||
fprintf(stderr, "%s: trying to download model from %s to %s (server_etag:%s, server_last_modified:%s)...\n", __func__,
|
fprintf(stderr, "%s: trying to download model from %s to %s (server_etag:%s, server_last_modified:%s)...\n", __func__,
|
||||||
llama_download_hide_password_in_url(url).c_str(), path.c_str(), headers.etag.c_str(), headers.last_modified.c_str());
|
llama_download_hide_password_in_url(url).c_str(), path.c_str(), headers.etag.c_str(), headers.last_modified.c_str());
|
||||||
bool was_perform_successful = perform_with_retry(url, curl.get(), CURL_MAX_RETRY, CURL_RETRY_DELAY_SECONDS);
|
bool was_perform_successful = curl_perform_with_retry(url, curl.get(), CURL_MAX_RETRY, CURL_RETRY_DELAY_SECONDS);
|
||||||
if (!was_perform_successful) {
|
if (!was_perform_successful) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
1
lora-tests
Submodule
1
lora-tests
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit c26d5fb85b4070a9e9c4e65d132c783b98086890
|
Loading…
Add table
Add a link
Reference in a new issue