update default model URLs (#1538)

This commit is contained in:
cebtenzzre
2023-10-19 15:25:37 -04:00
committed by GitHub
parent 4338e72a51
commit 245c5ce5ea
8 changed files with 10 additions and 10 deletions

View File

@@ -705,7 +705,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
##### url
Remote download url. Defaults to `https://gpt4all.io/models/<modelName>`
Remote download url. Defaults to `https://gpt4all.io/models/gguf/<modelName>`
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

View File

@@ -444,8 +444,8 @@ interface DownloadModelOptions {
verbose?: boolean;
/**
* Remote download url. Defaults to `https://gpt4all.io/models/<modelName>`
* @default https://gpt4all.io/models/<modelName>
* Remote download url. Defaults to `https://gpt4all.io/models/gguf/<modelName>`
* @default https://gpt4all.io/models/gguf/<modelName>
*/
url?: string;
/**

View File

@@ -113,7 +113,7 @@ function downloadModel(modelName, options = {}) {
);
const finalModelPath = path.join(downloadOptions.modelPath, modelFileName);
const modelUrl =
downloadOptions.url ?? `https://gpt4all.io/models/${modelFileName}`;
downloadOptions.url ?? `https://gpt4all.io/models/gguf/${modelFileName}`;
mkdirp.sync(downloadOptions.modelPath)