simonw / llm-gpt4all

Plugin for LLM adding support for the GPT4All collection of models
Apache License 2.0
194 stars 19 forks source link

Switch to model2.json and latest gpt4all #16

Closed simonw closed 8 months ago

simonw commented 8 months ago

The latest gpt4all no longer works with models from the old models.json file. It needs models from models2.json instead.

Details here:

simonw commented 8 months ago

This seems to work:

diff --git a/llm_gpt4all.py b/llm_gpt4all.py
index a4568d4..0b0e8e0 100644
--- a/llm_gpt4all.py
+++ b/llm_gpt4all.py
@@ -24,8 +24,8 @@ class GPT4All(_GPT4All):

 def get_gpt4all_models():
     return fetch_cached_json(
-        url="https://gpt4all.io/models/models.json",
-        path=llm.user_dir() / "gpt4all_models.json",
+        url="https://gpt4all.io/models/models2.json",
+        path=llm.user_dir() / "gpt4all_models2.json",
         cache_timeout=3600,
     )

Should bump the minimum version of gpt4all too.

simonw commented 8 months ago

Added upgrade instructions to the 0.2 release notes:

The new version of gpt4all uses models in the gguf format. You may have existing ggml models - these will no longer be used by the plugin, so it's safe to delete those files from your ~/.cache/gpt4all directory.