eliza icon indicating copy to clipboard operation
eliza copied to clipboard

Store all local models in /models folder, with overridable model path

Open lalalune opened this issue 1 year ago • 1 comments

We should make sure that all models stored by llama, whisper, embedding, etc all get stored in a /models folder that is easy to find and clean. This way the repo doesn't get huge and locating models isn't messy.

Here are the steps:

  1. Look for all services where models are being loaded, including llama, fastembed, whisper, etc
  2. Change all paths to be eliza/models
  3. Add a path checker if that doesn't exist with some sane defaults to handle any case
  4. Add a model path override to functions so the packaged version doesn't go somewhere weird.

lalalune avatar Nov 09 '24 01:11 lalalune

Shouldn't we just make it an environment variable so users might have their models stored at some different directory for any other purpose and they can easily point to that directory? and or Downloading model happens to that particular path?

For example like the follow one.

in .env

#LlamaLocal Configuration LLAMALOCAL_PATH= # Default: "" which is the current directory in plugin-node/dist/ which gets destroyed and recreated on every build

then in llama.ts line no 188, this.modelPath = path.join(process.env.LLAMALOCAL_PATH, modelName);

dr-fusion avatar Nov 28 '24 15:11 dr-fusion