"[GPT4All](https://gpt4all.io/index.html) is a free-to-use, locally running, privacy-aware chatbot. There is no GPU or internet required. It features popular models and its own models such as GPT4All Falcon, Wizard, etc.\n",
"\n",
"This notebook explains how to use [GPT4All embeddings](https://docs.gpt4all.io/gpt4all_python_embedding.html#gpt4all.gpt4all.Embed4All) with LangChain."
"This notebook explains how to use [GPT4All embeddings](https://docs.gpt4all.io/gpt4all_python_embedding.html#gpt4all.gpt4all.Embed4All) with LangChain."
]
]
},
},
{
"attachments": {},
"cell_type": "markdown",
"id": "46b7aa85",
"metadata": {},
"source": [
"## Install GPT4All's Python Bindings"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
@ -17,7 +29,16 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"! pip install gpt4all"
"%pip install gpt4all > /dev/null"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d80f4b92",
"metadata": {},
"source": [
"Note: you may need to restart the kernel to use updated packages."
]
]
},
},
{
{
@ -72,6 +93,15 @@
"text = \"This is a test document.\""
"text = \"This is a test document.\""
]
]
},
},
{
"attachments": {},
"cell_type": "markdown",
"id": "eef36bde",
"metadata": {},
"source": [
"## Embed the Textual Data"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 4,
"execution_count": 4,
@ -82,6 +112,15 @@
"query_result = gpt4all_embd.embed_query(text)"
"query_result = gpt4all_embd.embed_query(text)"
]
]
},
},
{
"attachments": {},
"cell_type": "markdown",
"id": "12b24e69",
"metadata": {},
"source": [
"With embed_documents you can embed multiple pieces of text. You can also map these embeddings with [Nomic's Atlas](https://docs.nomic.ai/index.html) to see a visual representation of your data."
">[Atlas](https://docs.nomic.ai/index.html) is a platform for interacting with both small and internet scale unstructured datasets by `Nomic`. \n",
">[Atlas](https://docs.nomic.ai/index.html) is a platform by Nomic made for interacting with both small and internet scale unstructured datasets. It enables anyone to visualize, search, and share massive datasets in their browser.\n",
"\n",
"\n",
"This notebook shows you how to use functionality related to the `AtlasDB` vectorstore."
"This notebook shows you how to use functionality related to the `AtlasDB` vectorstore."