mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-12 22:28:03 +00:00
docs: Update Google El Carro for Oracle Workload Documentation. (#18394)
In this commit we update the documentation for Google El Carro for Oracle Workloads. We amend the documentation in the Google Providers page to use the correct name which is El Carro for Oracle Workloads. We also add changes to the document_loaders and memory pages to reflect changes we made in our repo.
This commit is contained in:
parent
e192f6b6eb
commit
dd6f85caf1
@ -2,9 +2,6 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {
|
|
||||||
"id": "NKbPFu-GWFDV"
|
|
||||||
},
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Google El Carro Oracle Operator\n",
|
"# Google El Carro Oracle Operator\n",
|
||||||
">\n",
|
">\n",
|
||||||
@ -13,14 +10,18 @@
|
|||||||
"community driven, no vendor lock-in container orchestration system. El Carro\n",
|
"community driven, no vendor lock-in container orchestration system. El Carro\n",
|
||||||
"provides a powerful declarative API for comprehensive and consistent\n",
|
"provides a powerful declarative API for comprehensive and consistent\n",
|
||||||
"configuration and deployment as well as for real-time operations and\n",
|
"configuration and deployment as well as for real-time operations and\n",
|
||||||
"monitoring..\n",
|
"monitoring.\n",
|
||||||
"Extend your database application to build AI-powered experiences leveraging\n",
|
"Extend your Oracle database's capabilities to build AI-powered experiences by\n",
|
||||||
"Oracle Langchain integrations.\n",
|
"leveraging the El Carro Langchain integration.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"This guide goes over how to use El Carro Langchain integration to\n",
|
"This guide goes over how to use El Carro Langchain integration to\n",
|
||||||
"[save, load and delete langchain documents](https://python.langchain.com/docs/modules/data_connection/document_loaders/)\n",
|
"[save, load and delete langchain documents](https://python.langchain.com/docs/modules/data_connection/document_loaders/)\n",
|
||||||
"with `ElCarroLoader` and `ElCarroDocumentSaver`."
|
"with `ElCarroLoader` and `ElCarroDocumentSaver`. This integration works for\n",
|
||||||
]
|
"any Oracle database, regardless of where it is running."
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
@ -68,16 +69,61 @@
|
|||||||
"## Basic Usage\n",
|
"## Basic Usage\n",
|
||||||
"\n",
|
"\n",
|
||||||
"### Set Up Oracle Database Connection\n",
|
"### Set Up Oracle Database Connection\n",
|
||||||
"\n",
|
"Fill out the following variable with your Oracle database connections details."
|
||||||
"ElCarroEngine configures a connection pool to your Oracle database,\n",
|
|
||||||
"enabling successful connections from your application and following industry\n",
|
|
||||||
"best practices.\n",
|
|
||||||
"\n",
|
|
||||||
"You can find the hostname and port values in the status of the El Carro\n",
|
|
||||||
"Kubernetes instance.\n",
|
|
||||||
"Use the user password you created for your PDB."
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# @title Set Your Values Here { display-mode: \"form\" }\n",
|
||||||
|
"HOST = \"127.0.0.1\" # @param {type: \"string\"}\n",
|
||||||
|
"PORT = 3307 # @param {type: \"integer\"}\n",
|
||||||
|
"DATABASE = \"my-database\" # @param {type: \"string\"}\n",
|
||||||
|
"TABLE_NAME = \"message_store\" # @param {type: \"string\"}\n",
|
||||||
|
"USER = \"my-user\" # @param {type: \"string\"}\n",
|
||||||
|
"PASSWORD = input(\"Please provide a password to be used for the database user: \")"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"\n",
|
||||||
|
"If you are using El Carro, you can find the hostname and port values in the\n",
|
||||||
|
"status of the El Carro Kubernetes instance.\n",
|
||||||
|
"Use the user password you created for your PDB.\n",
|
||||||
|
"Example"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"kubectl get -w instances.oracle.db.anthosapis.com -n db\n",
|
||||||
|
"NAME DB ENGINE VERSION EDITION ENDPOINT URL DB NAMES BACKUP ID READYSTATUS READYREASON DBREADYSTATUS DBREADYREASON\n",
|
||||||
|
"mydb Oracle 18c Express mydb-svc.db 34.71.69.25:6021 False CreateInProgress"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"### ElCarroEngine Connection Pool\n",
|
||||||
|
"\n",
|
||||||
|
"`ElCarroEngine` configures a connection pool to your Oracle database, enabling successful connections from your application and following industry best practices."
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
@ -362,7 +408,8 @@
|
|||||||
" elcarro_engine=elcarro_engine,\n",
|
" elcarro_engine=elcarro_engine,\n",
|
||||||
" TABLE_NAME=TABLE_NAME,\n",
|
" TABLE_NAME=TABLE_NAME,\n",
|
||||||
")\n",
|
")\n",
|
||||||
"loader.load()"
|
"loaded_docs = loader.load()\n",
|
||||||
|
"print(f\"Loaded Documents: [{loaded_docs}]\")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -421,10 +468,10 @@
|
|||||||
"specify the list of `metadata_columns` we want it to have. In this example, the\n",
|
"specify the list of `metadata_columns` we want it to have. In this example, the\n",
|
||||||
"created table will have table columns:\n",
|
"created table will have table columns:\n",
|
||||||
"\n",
|
"\n",
|
||||||
"- description (type: text): for storing fruit description.\n",
|
"- content (type: text): for storing fruit description.\n",
|
||||||
"- fruit_name (type text): for storing fruit name.\n",
|
"- type (type text): for storing fruit type.\n",
|
||||||
"- organic (type tinyint(1)): to tell if the fruit is organic.\n",
|
"- weight (type INT): for storing fruit weight.\n",
|
||||||
"- other_metadata (type: JSON): for storing other metadata information of the\n",
|
"- extra_json_metadata (type: JSON): for storing other metadata information of the\n",
|
||||||
" fruit.\n",
|
" fruit.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"We can use the following parameters\n",
|
"We can use the following parameters\n",
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"# Google El Carro Oracle Operator\n",
|
"# Google El Carro Oracle Operator\n",
|
||||||
"\n",
|
"\n",
|
||||||
"> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator) offers a way to run Oracle databases in Kubernetes as a portable, open source, community driven, no vendor lock-in container orchestration system. El Carro provides a powerful declarative API for comprehensive and consistent configuration and deployment as well as for real-time operations and monitoring. Extend your database application to build AI-powered experiences leveraging Oracle Langchain integrations.\n",
|
"> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator) offers a way to run Oracle databases in Kubernetes as a portable, open source, community driven, no vendor lock-in container orchestration system. El Carro provides a powerful declarative API for comprehensive and consistent configuration and deployment as well as for real-time operations and monitoring. Extend your Oracle database's capabilities to build AI-powered experiences by leveraging the El Carro Langchain integration.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"This guide goes over how to use the El Carro Langchain integration to store chat message history with the `ElCarroChatMessageHistory` class.\n",
|
"This guide goes over how to use the El Carro Langchain integration to store chat message history with the `ElCarroChatMessageHistory` class. This integration works for any Oracle database, regardless of where it is running.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[](https://colab.research.google.com/github/googleapis/langchain-google-el-carro-python/blob/main/docs/chat_message_history.ipynb)"
|
"[](https://colab.research.google.com/github/googleapis/langchain-google-el-carro-python/blob/main/docs/chat_message_history.ipynb)"
|
||||||
]
|
]
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"## Before You Begin\n",
|
"## Before You Begin\n",
|
||||||
"\n",
|
"\n",
|
||||||
"To run this notebook, you will need to do the following:\n",
|
"To run this notebook, you will need to do the following:\n",
|
||||||
" * Complete the [Getting Started](https://github.com/googleapis/langchain-google-el-carro-python/tree/main/README.md#getting-started) section"
|
" * Complete the [Getting Started](https://github.com/googleapis/langchain-google-el-carro-python/tree/main/README.md#getting-started) section if you would like to run your Oracle database with El Carro."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -122,14 +122,12 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"### Set Up Oracle Database Connection\n",
|
"### Set Up Oracle Database Connection\n",
|
||||||
"You can find the hostname and port values in the status of the El Carro\n",
|
"Fill out the following variable with your Oracle database connections details."
|
||||||
"Kubernetes instance. Use the user password you created for your PDB."
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# @title Set Your Values Here { display-mode: \"form\" }\n",
|
"# @title Set Your Values Here { display-mode: \"form\" }\n",
|
||||||
@ -139,7 +137,34 @@
|
|||||||
"TABLE_NAME = \"message_store\" # @param {type: \"string\"}\n",
|
"TABLE_NAME = \"message_store\" # @param {type: \"string\"}\n",
|
||||||
"USER = \"my-user\" # @param {type: \"string\"}\n",
|
"USER = \"my-user\" # @param {type: \"string\"}\n",
|
||||||
"PASSWORD = input(\"Please provide a password to be used for the database user: \")"
|
"PASSWORD = input(\"Please provide a password to be used for the database user: \")"
|
||||||
]
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"\n",
|
||||||
|
"If you are using `El Carro`, you can find the hostname and port values in the\n",
|
||||||
|
"status of the `El Carro` Kubernetes instance.\n",
|
||||||
|
"Use the user password you created for your PDB.\n",
|
||||||
|
"Example"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"kubectl get -w instances.oracle.db.anthosapis.com -n db\n",
|
||||||
|
"NAME DB ENGINE VERSION EDITION ENDPOINT URL DB NAMES BACKUP ID READYSTATUS READYREASON DBREADYSTATUS DBREADYREASON\n",
|
||||||
|
"mydb Oracle 18c Express mydb-svc.db 34.71.69.25:6021 False CreateInProgress"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
@ -236,7 +261,7 @@
|
|||||||
"#### Cleaning up\n",
|
"#### Cleaning up\n",
|
||||||
"When the history of a specific session is obsolete and can be deleted, it can be done the following way.\n",
|
"When the history of a specific session is obsolete and can be deleted, it can be done the following way.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"**Note:** Once deleted, the data is no longer stored in AlloyDB and is gone forever."
|
"**Note:** Once deleted, the data is no longer stored in your database and is gone forever."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -236,6 +236,22 @@ See a [usage example](/docs/integrations/document_loaders/google_cloud_storage_f
|
|||||||
from langchain_community.document_loaders import GCSFileLoader
|
from langchain_community.document_loaders import GCSFileLoader
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### El Carro for Oracle Workloads
|
||||||
|
|
||||||
|
> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator)
|
||||||
|
offers a way to run Oracle databases in Kubernetes as a portable, open source,
|
||||||
|
community driven, no vendor lock-in container orchestration system.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install langchain-google-el-carro
|
||||||
|
```
|
||||||
|
|
||||||
|
See [usage example](/docs/integrations/document_loaders/google_el_carro).
|
||||||
|
|
||||||
|
```python
|
||||||
|
from langchain_google_el_carro import ElCarroLoader
|
||||||
|
```
|
||||||
|
|
||||||
### Google Drive
|
### Google Drive
|
||||||
|
|
||||||
>[Google Drive](https://en.wikipedia.org/wiki/Google_Drive) is a file storage and synchronization service developed by Google.
|
>[Google Drive](https://en.wikipedia.org/wiki/Google_Drive) is a file storage and synchronization service developed by Google.
|
||||||
@ -315,22 +331,6 @@ See [usage example](/docs/integrations/document_loaders/google_spanner).
|
|||||||
from langchain_google_spanner import SpannerLoader
|
from langchain_google_spanner import SpannerLoader
|
||||||
```
|
```
|
||||||
|
|
||||||
## El Carro Oracle Operator
|
|
||||||
|
|
||||||
> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator)
|
|
||||||
offers a way to run Oracle databases in Kubernetes as a portable, open source,
|
|
||||||
community driven, no vendor lock-in container orchestration system.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pip install langchain-google-el-carro
|
|
||||||
```
|
|
||||||
|
|
||||||
See [usage example](/docs/integrations/document_loaders/google_el_carro).
|
|
||||||
|
|
||||||
```python
|
|
||||||
from langchain_google_el_carro import ElCarroLoader
|
|
||||||
```
|
|
||||||
|
|
||||||
### Speech-to-Text
|
### Speech-to-Text
|
||||||
|
|
||||||
> [Google Cloud Speech-to-Text](https://cloud.google.com/speech-to-text) is an audio transcription API powered by Google's speech recognition models in Google Cloud.
|
> [Google Cloud Speech-to-Text](https://cloud.google.com/speech-to-text) is an audio transcription API powered by Google's speech recognition models in Google Cloud.
|
||||||
@ -737,7 +737,7 @@ from langchain_community.agent_toolkits import GmailToolkit
|
|||||||
|
|
||||||
### AlloyDB for PostgreSQL
|
### AlloyDB for PostgreSQL
|
||||||
|
|
||||||
> [AlloyDB](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.
|
> [AlloyDB for PostgreSQL](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.
|
||||||
|
|
||||||
Install the python package:
|
Install the python package:
|
||||||
|
|
||||||
@ -797,6 +797,22 @@ See [usage example](/docs/integrations/memory/google_cloud_sql_mssql).
|
|||||||
from langchain_google_cloud_sql_mssql import MSSQLEngine, MSSQLChatMessageHistory
|
from langchain_google_cloud_sql_mssql import MSSQLEngine, MSSQLChatMessageHistory
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## El Carro for Oracle Workloads
|
||||||
|
|
||||||
|
> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator)
|
||||||
|
offers a way to run Oracle databases in Kubernetes as a portable, open source,
|
||||||
|
community driven, no vendor lock-in container orchestration system.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install langchain-google-el-carro
|
||||||
|
```
|
||||||
|
|
||||||
|
See [usage example](/docs/integrations/memory/google_el_carro).
|
||||||
|
|
||||||
|
```python
|
||||||
|
from langchain_google_el_carro import ElCarroChatMessageHistory
|
||||||
|
```
|
||||||
|
|
||||||
### Spanner
|
### Spanner
|
||||||
|
|
||||||
> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, mission-critical, relational database service on Google Cloud that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL.
|
> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, mission-critical, relational database service on Google Cloud that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL.
|
||||||
|
Loading…
Reference in New Issue
Block a user