Skip to content

The agent engineering platform.

docs: add example for reusing an existing collection (#32774)

may2c2bab93fc18
diff --git a/docs/docs/integrations/vectorstores/weaviate.ipynb b/docs/docs/integrations/vectorstores/weaviate.ipynb
index b3ee93ae34..c1d43e00c8 100644
--- a/docs/docs/integrations/vectorstores/weaviate.ipynb
+++ b/docs/docs/integrations/vectorstores/weaviate.ipynb
@@ -47,7 +47,20 @@
"\n",
"Some Weaviate instances, such as those running on WCS, have authentication enabled, such as API key and/or username+password authentication.\n",
"\n",
- "Read the [client authentication guide](https://weaviate.io/developers/weaviate/client-libraries/python#authentication) for more information, as well as the [in-depth authentication configuration page](https://weaviate.io/developers/weaviate/configuration/authentication)."
+ "Read the [client authentication guide](https://weaviate.io/developers/weaviate/client-libraries/python#authentication) for more information, as well as the [in-depth authentication configuration page](https://weaviate.io/developers/weaviate/configuration/authentication).\n",
+ "\n",
+ "### Connect to an existing collection (reuse an index)\n",
+ "If you already created a collection in your local Weaviate instance, you can connect to it directly:",
+ "\n",
+ "```python\n",
+ "from langchain_weaviate import WeaviateVectorStore\n",
+ "\n",
+ "store = WeaviateVectorStore(\n",
+ " client=weaviate_client,\n",
+ " index_name=\"Test\",\n",
+ " text_key=\"text\",\n",
+ ")\n",
+ "```\n"
]
},
{