mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 22:11:51 +00:00
Update GPT4ALL integration (#4567)
# Update GPT4ALL integration GPT4ALL have completely changed their bindings. They use a bit odd implementation that doesn't fit well into base.py and it will probably be changed again, so it's a temporary solution. Fixes #3839, #4628
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"%pip install pygpt4all > /dev/null"
|
||||
"%pip install gpt4all > /dev/null"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -64,7 +64,7 @@
|
||||
"source": [
|
||||
"### Specify Model\n",
|
||||
"\n",
|
||||
"To run locally, download a compatible ggml-formatted model. For more info, visit https://github.com/nomic-ai/pygpt4all\n",
|
||||
"To run locally, download a compatible ggml-formatted model. For more info, visit https://github.com/nomic-ai/gpt4all\n",
|
||||
"\n",
|
||||
"For full installation instructions go [here](https://gpt4all.io/index.html).\n",
|
||||
"\n",
|
||||
@@ -102,7 +102,7 @@
|
||||
"\n",
|
||||
"# Path(local_path).parent.mkdir(parents=True, exist_ok=True)\n",
|
||||
"\n",
|
||||
"# # Example model. Check https://github.com/nomic-ai/pygpt4all for the latest models.\n",
|
||||
"# # Example model. Check https://github.com/nomic-ai/gpt4all for the latest models.\n",
|
||||
"# url = 'http://gpt4all.io/models/ggml-gpt4all-l13b-snoozy.bin'\n",
|
||||
"\n",
|
||||
"# # send a GET request to the URL to download the file. Stream since it's large\n",
|
||||
@@ -126,7 +126,8 @@
|
||||
"callbacks = [StreamingStdOutCallbackHandler()]\n",
|
||||
"# Verbose is required to pass to the callback manager\n",
|
||||
"llm = GPT4All(model=local_path, callbacks=callbacks, verbose=True)\n",
|
||||
"# If you want to use GPT4ALL_J model add the backend parameter\n",
|
||||
"# If you want to use a custom model add the backend parameter\n",
|
||||
"# Check https://docs.gpt4all.io/gpt4all_python.html for supported backends\n",
|
||||
"llm = GPT4All(model=local_path, backend='gptj', callbacks=callbacks, verbose=True)"
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user