diff --git a/src/LlamaContext.cpp b/src/LlamaContext.cpp index 2db1d3a..b233ce3 100644 --- a/src/LlamaContext.cpp +++ b/src/LlamaContext.cpp @@ -53,15 +53,10 @@ LlamaContext::LlamaContext(const Napi::CallbackInfo &info) auto options = info[0].As(); gpt_params params; - auto model_uri = get_option(options, "model", ""); - if (model_uri.empty()) { + params.model = get_option(options, "model", ""); + if (params.model.empty()) { Napi::TypeError::New(env, "Model is required").ThrowAsJavaScriptException(); } - if (model_uri.find("http://") == 0 || model_uri.find("https://") == 0) { - params.model_url = model_uri; - } else { - params.model = model_uri; - } params.embedding = get_option(options, "embedding", false); params.n_ctx = get_option(options, "n_ctx", 512); params.n_batch = get_option(options, "n_batch", 2048);