Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions docs/chat_message_history.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
"collapsed": false
},
"source": [
"# Cloud Spanner\n",
"> [Cloud Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution.\n",
"# Google Spanner\n",
"> [Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution.\n",
"\n",
"This notebook goes over how to use `Spanner` to store chat message history with the `SpannerChatMessageHistory` class."
"This notebook goes over how to use `Spanner` to store chat message history with the `SpannerChatMessageHistory` class.\n",
"\n",
"Learn more about the package on [GitHub](https://github.com/googleapis/langchain-google-spanner-python/).\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/googleapis/langchain-google-spanner-python/blob/main/samples/chat_message_history.ipynb)"
]
},
{
Expand Down Expand Up @@ -146,7 +150,7 @@
},
"outputs": [],
"source": [
"# enable Cloud SQL Admin API\n",
"# enable Spanner API\n",
"!gcloud services enable spanner.googleapis.com"
]
},
Expand All @@ -167,8 +171,8 @@
"id": "OMvzMWRrR6n7"
},
"source": [
"### Set Cloud SQL database values\n",
"Find your database values, in the [Cloud SQL Instances page](https://console.cloud.google.com/sql?_ga=2.223735448.2062268965.1707700487-2088871159.1707257687)."
"### Set Spanner database values\n",
"Find your database values, in the [Spanner Instances page](https://console.cloud.google.com/spanner)."
]
},
{
Expand Down
6 changes: 4 additions & 2 deletions docs/document_loader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Spanner\n",
"# Google Spanner\n",
"\n",
"> [Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution. Extend your database application to build AI-powered experiences leveraging Cloud SQL's Langchain integrations.\n",
"> [Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution.\n",
"\n",
"This notebook goes over how to use [Spanner](https://cloud.google.com/spanner) to [save, load and delete langchain documents](https://python.langchain.com/docs/modules/data_connection/document_loaders/) with `SpannerLoader` and `SpannerDocumentSaver`.\n",
"\n",
"Learn more about the package on [GitHub](https://github.com/googleapis/langchain-google-spanner-python/).\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/googleapis/langchain-google-spanner-python/blob/main/docs/document_loader.ipynb)"
]
},
Expand Down
16 changes: 10 additions & 6 deletions docs/vector_store.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Cloud Spanner\n",
"> [Cloud Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution.\n",
"# Google Spanner\n",
"> [Spanner](https://cloud.google.com/spanner) is a highly scalable database that combines unlimited scalability with relational semantics, such as secondary indexes, strong consistency, schemas, and SQL providing 99.999% availability in one easy solution.\n",
"\n",
"This notebook goes over how to use `Spanner` for Vector Search with `SpannerVectorStore` class."
"This notebook goes over how to use `Spanner` for Vector Search with `SpannerVectorStore` class.\n",
"\n",
"Learn more about the package on [GitHub](https://github.com/googleapis/langchain-google-spanner-python/).\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/googleapis/langchain-google-spanner-python/blob/main/docs/vector_store.ipynb)"
]
},
{
Expand Down Expand Up @@ -135,7 +139,7 @@
"metadata": {},
"outputs": [],
"source": [
"# enable Cloud SQL Admin API\n",
"# enable Spanner API\n",
"!gcloud services enable spanner.googleapis.com"
]
},
Expand All @@ -150,8 +154,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Set Cloud Spanner database values\n",
"Find your database values, in the [Cloud Spanner Instances page](https://console.cloud.google.com/spanner?_ga=2.223735448.2062268965.1707700487-2088871159.1707257687)."
"### Set Spanner database values\n",
"Find your database values, in the [Spanner Instances page](https://console.cloud.google.com/spanner?_ga=2.223735448.2062268965.1707700487-2088871159.1707257687)."
]
},
{
Expand Down
15 changes: 9 additions & 6 deletions samples/langchain_quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"outputs": [],
"source": [
"%pip install langchain-google-spanner\n",
"\n",
"# Install additional dependencies\n",
"%pip install langchain langchain-google-vertexai"
]
},
Expand All @@ -127,9 +127,7 @@
"metadata": {},
"outputs": [],
"source": [
"from google.colab import auth\n",
"\n",
"auth.authenticate_user()"
"!gcloud auth login"
]
},
{
Expand Down Expand Up @@ -367,7 +365,7 @@
"database = instance.database(database_id)\n",
"table_name = \"netflix_titles\"\n",
"\n",
"database.update_ddl(\n",
"operation = database.update_ddl(\n",
" [\n",
" \"\"\"CREATE TABLE IF NOT EXISTS {} (\n",
" show_id STRING(MAX) NOT NULL,\n",
Expand All @@ -386,7 +384,12 @@
" table_name\n",
" )\n",
" ]\n",
")"
")\n",
"\n",
"print(\"Waiting for operation to complete...\")\n",
"operation.result(240)\n",
"\n",
"print(\"Table created.\")"
]
},
{
Expand Down