"Note: This is separate from the Google PaLM integration. Google has chosen to offer an enterprise version of PaLM through GCP, and this supports the models made available through there. \n",
"\n",
"By default, Google Cloud [does not use](https://cloud.google.com/vertex-ai/docs/generative-ai/data-governance#foundation_model_development) Customer Data to train its foundation models as part of Google Cloud`s AI/ML Privacy Commitment. More details about how Google processes data can also be found in [Google's Customer Data Processing Addendum (CDPA)](https://cloud.google.com/terms/data-processing-addendum).\n",
"By default, Google Cloud [does not use](https://cloud.google.com/vertex-ai/docs/generative-ai/data-governance#foundation_model_development) customer data to train its foundation models as part of Google Cloud`s AI/ML Privacy Commitment. More details about how Google processes data can also be found in [Google's Customer Data Processing Addendum (CDPA)](https://cloud.google.com/terms/data-processing-addendum).\n",
"\n",
"To use Vertex AI PaLM you must have the `google-cloud-aiplatform` Python package installed and either:\n",
"To use `Google Cloud Vertex AI` PaLM you must have the `google-cloud-aiplatform` Python package installed and either:\n",
"- Have credentials configured for your environment (gcloud, workload identity, etc...)\n",
"- Store the path to a service account JSON file as the GOOGLE_APPLICATION_CREDENTIALS environment variable\n",
All functionality related to [Google Cloud Platform](https://cloud.google.com/)
All functionality related to [Google Cloud Platform](https://cloud.google.com/) and other `Google` products.
## LLMs
### Vertex AI
Access PaLM LLMs like `text-bison` and `code-bison` via Google Cloud.
Access `PaLM` LLMs like `text-bison` and `code-bison` via `Google Vertex AI`.
We need to install `google-cloud-aiplatform` python package.
```bash
pip install google-cloud-aiplatform
```
See a [usage example](/docs/integrations/llms/google_vertex_ai_palm).
```python
from langchain.llms import VertexAI
@ -14,7 +22,15 @@ from langchain.llms import VertexAI
### Model Garden
Access PaLM and hundreds of OSS models via Vertex AI Model Garden.
Access PaLM and hundreds of OSS models via `Vertex AI Model Garden`.
We need to install `google-cloud-aiplatform` python package.
```bash
pip install google-cloud-aiplatform
```
See a [usage example](/docs/integrations/llms/google_vertex_ai_palm#vertex-model-garden).
```python
from langchain.llms import VertexAIModelGarden
@ -26,17 +42,26 @@ from langchain.llms import VertexAIModelGarden
Access PaLM chat models like `chat-bison` and `codechat-bison` via Google Cloud.
We need to install `google-cloud-aiplatform` python package.
```bash
pip install google-cloud-aiplatform
```
See a [usage example](/docs/integrations/chat/google_vertex_ai_palm).
```python
from langchain.chat_models import ChatVertexAI
```
## Document Loader
## Document Loaders
### Google BigQuery
> [Google BigQuery](https://cloud.google.com/bigquery) is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data.
`BigQuery` is a part of the `Google Cloud Platform`.
First, we need to install `google-cloud-bigquery` python package.
We need to install `google-cloud-bigquery` python package.
```bash
pip install google-cloud-bigquery
@ -50,9 +75,9 @@ from langchain.document_loaders import BigQueryLoader
### Google Cloud Storage
>[Google Cloud Storage](https://en.wikipedia.org/wiki/Google_Cloud_Storage) is a managed service for storing unstructured data.
>[Google Cloud Storage](https://en.wikipedia.org/wiki/Google_Cloud_Storage) is a managed service for storing unstructured data.
First, we need to install `google-cloud-storage` python package.
We need to install `google-cloud-storage` python package.
```bash
pip install google-cloud-storage
@ -73,11 +98,11 @@ from langchain.document_loaders import GCSFileLoader
### 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.
Currently, only `Google Docs` are supported.
First, we need to install several python packages.
- Install requirements with `pip install google-api-python-client`
- Set up a Custom Search Engine, following [these instructions](https://stackoverflow.com/questions/37083058/programmatically-searching-google-in-python-using-custom-search)
- Get an API Key and Custom Search Engine ID from the previous step, and set them as environment variables `GOOGLE_API_KEY` and `GOOGLE_CSE_ID` respectively
### Google Drive
There exists a `GoogleSearchAPIWrapper` utility which wraps this API. To import this utility:
We need to install several python packages.
```python
from langchain.utilities import GoogleSearchAPIWrapper
For a more detailed walkthrough of this wrapper, see [this notebook](/docs/integrations/tools/google_search).
We can easily load this wrapper as a Tool (to use with an Agent). We can do this with:
See a [usage example and authorization instructions](/docs/integrations/tools/google_drive).
```python
from langchain.agents import load_tools
tools = load_tools(["google-search"])
from langchain.utilities.google_drive import GoogleDriveAPIWrapper
from langchain.tools.google_drive.tool import GoogleDriveSearchTool
```
### Google Places
See a [usage example](/docs/integrations/tools/google_places).
We need to install a python package.
```
```bash
pip install googlemaps
```
See a [usage example and authorization instructions](/docs/integrations/tools/google_places).
```python
from langchain.tools import GooglePlacesTool
```
### Google Search
We need to install a python package.
```bash
pip install google-api-python-client
```
- Set up a Custom Search Engine, following [these instructions](https://stackoverflow.com/questions/37083058/programmatically-searching-google-in-python-using-custom-search)
- Get an API Key and Custom Search Engine ID from the previous step, and set them as environment variables `GOOGLE_API_KEY` and `GOOGLE_CSE_ID` respectively
```python
from langchain.utilities import GoogleSearchAPIWrapper
```
For a more detailed walkthrough of this wrapper, see [this notebook](/docs/integrations/tools/google_search).
We can easily load this wrapper as a Tool (to use with an Agent). We can do this with:
```python
from langchain.agents import load_tools
tools = load_tools(["google-search"])
```
## Document Transformers
### Google Document AI
>[Document AI](https://cloud.google.com/document-ai/docs/overview) is a `Google Cloud Platform`
> service to transform unstructured data from documents into structured data, making it easier
> service that transforms unstructured data from documents into structured data, making it easier
> to understand, analyze, and consume.
We need to set up a [`GCS` bucket and create your own OCR processor](https://cloud.google.com/document-ai/docs/create-processor)
@ -269,15 +335,54 @@ See a [usage example and authorization instructions](/docs/integrations/document
from langchain.document_transformers import GoogleTranslateTransformer
```
## Chat loaders
### Gmail
## Toolkits
### GMail
> [Gmail](https://en.wikipedia.org/wiki/Gmail) is a free email service provided by Google.
This toolkit works with emails through the `Gmail API`.