The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Update `gpt4all.mdx` doc (#15392)
Bob Lin4488234d648d
diff --git a/docs/docs/integrations/providers/gpt4all.mdx b/docs/docs/integrations/providers/gpt4all.mdxindex 0917bff1a3..01cc169803 100644--- a/docs/docs/integrations/providers/gpt4all.mdx+++ b/docs/docs/integrations/providers/gpt4all.mdx@@ -4,8 +4,15 @@ This page covers how to use the `GPT4All` wrapper within LangChain. The tutorial## Installation and Setup-- Install the Python package with `pip install pyllamacpp`-- Download a [GPT4All model](https://github.com/nomic-ai/pyllamacpp#supported-model) and place it in your desired directory+- Install the Python package with `pip install gpt4all`+- Download a [GPT4All model](https://gpt4all.io/index.html) and place it in your desired directory++In this example, We are using `mistral-7b-openorca.Q4_0.gguf`(Best overall fast chat model):++```bash+mkdir models+wget https://gpt4all.io/models/gguf/mistral-7b-openorca.Q4_0.gguf -O models/mistral-7b-openorca.Q4_0.gguf+```## Usage@@ -17,7 +24,7 @@ To use the GPT4All wrapper, you need to provide the path to the pre-trained modefrom langchain.llms import GPT4All# Instantiate the model. Callbacks support token-wise streaming-model = GPT4All(model="./models/gpt4all-model.bin", n_ctx=512, n_threads=8)+model = GPT4All(model="./models/mistral-7b-openorca.Q4_0.gguf", n_threads=8)# Generate textresponse = model("Once upon a time, ")@@ -35,7 +42,7 @@ from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler# from langchain.callbacks.streamlit import StreamlitCallbackHandlercallbacks = [StreamingStdOutCallbackHandler()]-model = GPT4All(model="./models/gpt4all-model.bin", n_ctx=512, n_threads=8)+model = GPT4All(model="./models/mistral-7b-openorca.Q4_0.gguf", n_threads=8)# Generate text. Tokens are streamed through the callback manager.model("Once upon a time, ", callbacks=callbacks)@@ -43,6 +50,6 @@ model("Once upon a time, ", callbacks=callbacks)## Model File-You can find links to model file downloads in the [pyllamacpp](https://github.com/nomic-ai/pyllamacpp) repository.+You can find links to model file downloads in the [https://gpt4all.io/](https://gpt4all.io/index.html).For a more detailed walkthrough of this, see [this notebook](/docs/integrations/llms/gpt4all)