Google SQL for SQL Server
Google Cloud SQL is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability. It offers
MySQL
,PostgreSQL
, andSQL Server
database engines. Extend your database application to build AI-powered experiences leveraging Cloud SQL's Langchain integrations.
This notebook goes over how to use Google Cloud SQL for SQL Server
to store chat message history with the MSSQLChatMessageHistory
class.
Learn more about the package on GitHub.
Before You Begin
To run this notebook, you will need to do the following:
- Create a Google Cloud Project
- Enable the Cloud SQL Admin API.
- Create a Cloud SQL for SQL Server instance
- Create a Cloud SQL database
- Create a database user (Optional if you choose to use the
sqlserver
user)
🦜🔗 Library Installation
The integration lives in its own langchain-google-cloud-sql-mssql
package, so we need to install it.
%pip install --upgrade --quiet langchain-google-cloud-sql-mssql langchain-google-vertexai
Colab only: Uncomment the following cell to restart the kernel or use the button to restart the kernel. For Vertex AI Workbench you can restart the terminal using the button on top.
# # Automatically restart kernel after installs so that your environment can access the new packages
# import IPython
# app = IPython.Application.instance()
# app.kernel.do_shutdown(True)