File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 3939#if defined(LLAMA_USE_CURL)
4040#include < curl/curl.h>
4141#include < curl/easy.h>
42- #else
42+ #elif defined(LLAMA_USE_HTTPLIB)
4343#include < cpp-httplib/httplib.h>
4444#endif
4545
@@ -572,6 +572,8 @@ std::pair<long, std::vector<char>> common_remote_get_content(const std::string &
572572
573573#else
574574
575+ #ifdef LLAMA_USE_HTTPLIB
576+
575577bool common_has_curl () {
576578 return false ;
577579}
@@ -936,6 +938,26 @@ std::pair<long, std::vector<char>> common_remote_get_content(const std::string
936938 return { res->status , std::move (buf) };
937939}
938940
941+ #else // no httplib
942+
943+ bool common_has_curl () {
944+ return false ;
945+ }
946+
947+ static bool common_download_file_single_online (const std::string &, const std::string &, const std::string &) {
948+ LOG_ERR (" error: built without CURL, cannot download model from internet\n " );
949+ return false ;
950+ }
951+
952+ std::pair<long , std::vector<char >> common_remote_get_content (const std::string & url, const common_remote_params &) {
953+ if (!url.empty ()) {
954+ throw std::runtime_error (" error: built without CURL, cannot download model from the internet" );
955+ }
956+
957+ return {};
958+ }
959+ #endif
960+
939961#endif // LLAMA_USE_CURL
940962
941963static bool common_download_file_single (const std::string & url,
You can’t perform that action at this time.
0 commit comments