feat : Adding hf_token declaration and user input support
This commit is contained in:
parent
c9373e7efa
commit
b79a41ee6a
2 changed files with 2 additions and 2 deletions
|
@ -2099,8 +2099,7 @@ struct llama_model * llama_load_model_from_url(
|
|||
}
|
||||
|
||||
if(params.hf_token!=NULL){
|
||||
struct curl_slist *headers = NULL;
|
||||
headers = curl_slist_append(headers, "Authorization: Bearer " + params.hf_token);
|
||||
struct curl_slist * headers = curl_slist_append(NULL, "Authorization: Bearer " + params.hf_token);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ struct gpt_params {
|
|||
std::string model_url = ""; // model url to download
|
||||
std::string hf_repo = ""; // HF repo
|
||||
std::string hf_file = ""; // HF file
|
||||
std::string hf_token = ""; // HF token
|
||||
std::string prompt = "";
|
||||
std::string prompt_file = ""; // store the external prompt file name
|
||||
std::string path_prompt_cache = ""; // path to file for saving/loading prompt eval state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue