From 7c03bacc1932717b532a0c603d26d393950a401d Mon Sep 17 00:00:00 2001 From: Richard Guo Date: Tue, 16 May 2023 15:29:27 -0400 Subject: [PATCH] Improvements to documentation (#606) --- gpt4all-bindings/python/README.md | 2 ++ gpt4all-bindings/python/docs/index.md | 2 +- gpt4all-bindings/python/gpt4all/gpt4all.py | 3 +++ gpt4all-bindings/python/mkdocs.yml | 10 ++-------- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gpt4all-bindings/python/README.md b/gpt4all-bindings/python/README.md index 4f07c6e2..1ae8d5c0 100644 --- a/gpt4all-bindings/python/README.md +++ b/gpt4all-bindings/python/README.md @@ -13,6 +13,8 @@ pip install gpt4all ## Local Build Instructions +**NOTE**: If you are doing this on a Windows machine, you must build the GPT4All backend using [MinGW64](https://www.mingw-w64.org/) compiler. + 1. Setup `llmodel` ``` diff --git a/gpt4all-bindings/python/docs/index.md b/gpt4all-bindings/python/docs/index.md index 7c586462..cfd70ad2 100644 --- a/gpt4all-bindings/python/docs/index.md +++ b/gpt4all-bindings/python/docs/index.md @@ -11,7 +11,7 @@ pip install gpt4all In Python, run the following commands to retrieve a GPT4All model and generate a response to a prompt. -**Download Note*:** +**Download Note:** By default, models are stored in `~/.cache/gpt4all/` (you can change this with `model_path`). If the file already exists, model download will be skipped. ```python diff --git a/gpt4all-bindings/python/gpt4all/gpt4all.py b/gpt4all-bindings/python/gpt4all/gpt4all.py index b602f1b0..94f6df9a 100644 --- a/gpt4all-bindings/python/gpt4all/gpt4all.py +++ b/gpt4all-bindings/python/gpt4all/gpt4all.py @@ -4,6 +4,7 @@ Python only API for running all GPT4All models. import json import os from pathlib import Path +import time from typing import Dict, List import requests @@ -148,6 +149,8 @@ class GPT4All(): raise RuntimeError( "An error occurred during download. Downloaded file may not work." ) + # Sleep for a little bit so OS can remove file lock + time.sleep(2) print("Model downloaded at: " + download_path) return download_path diff --git a/gpt4all-bindings/python/mkdocs.yml b/gpt4all-bindings/python/mkdocs.yml index 7af98860..5763665f 100644 --- a/gpt4all-bindings/python/mkdocs.yml +++ b/gpt4all-bindings/python/mkdocs.yml @@ -1,7 +1,7 @@ site_name: GPT4All Documentation repo_url: https://github.com/nomic-ai/gpt4all repo_name: nomic-ai/gpt4all -site_url: https://docs.nomic.ai # TODO: change +site_url: https://docs.gpt4all.io edit_uri: edit/main/docs/ site_description: Documentation for running GPT4All anywhere. copyright: Copyright © 2023 Nomic, Inc @@ -65,10 +65,4 @@ plugins: #- mkdocs-jupyter: # ignore_h1_titles: True - # show_input: True - -extra: - generator: false - analytics: - provider: google - property: G-NPXC8BYHJV \ No newline at end of file + # show_input: True \ No newline at end of file