langchain-google-genai
package. This is often the best starting point for individual developers.langchain-google-vertexai
package for Vertex AI models and specific packages (e.g., langchain-google-cloud-sql-pg
, langchain-google-community
) for other cloud services. This is ideal for developers already using Google Cloud or needing enterprise features like MLOps, specific model tuning or enterprise support.langchain-google-community
package.
ChatGoogleGenerativeAI
class to interact with Gemini models. See
details in this guide.
image_url
can be a public URL, a GCS URI (gs://...
), a local file path, a base64 encoded image string (data:image/png;base64,...
), or a PIL Image object.
gemini-embedding-001
with the GoogleGenerativeAIEmbeddings
class.
See a usage example.
GoogleGenerativeAI
class.
See a usage example.
langchain-google-vertexai
package. Other services might require additional packages like langchain-google-community
, langchain-google-cloud-sql-pg
, etc.
gcloud auth application-default login
).
Local Gemma model loaded from HuggingFace. Requires langchain-google-vertexai
.
Local Gemma model loaded from Kaggle. Requires langchain-google-vertexai
.
Requires langchain-google-vertexai
.
Implementation of the Image Captioning model as a chat. Requires langchain-google-vertexai
.
Given an image and a prompt, edit the image. Currently only supports mask-free editing. Requires langchain-google-vertexai
.
Generates an image from a prompt. Requires langchain-google-vertexai
.
Chat implementation of a visual QnA model. Requires langchain-google-vertexai
.
langchain-google-vertexai
.
See a usage example.
Local Gemma model loaded from HuggingFace. Requires langchain-google-vertexai
.
Local Gemma model loaded from Kaggle. Requires langchain-google-vertexai
.
Requires langchain-google-vertexai
.
Implementation of the Image Captioning model as an LLM. Requires langchain-google-vertexai
.
langchain-google-vertexai
.
See a usage example.
Google Cloud AlloyDB is a fully managed PostgreSQL-compatible database service.Install the python package:
Google Cloud BigQuery is a serverless data warehouse.Install with BigQuery dependencies:
Google Cloud Bigtable is a fully managed NoSQL Big Data database service.Install the python package:
Google Cloud SQL for MySQL is a fully-managed MySQL database service.Install the python package:
Google Cloud SQL for SQL Server is a fully-managed SQL Server database service.Install the python package:
Google Cloud SQL for PostgreSQL is a fully-managed PostgreSQL database service.Install the python package:
Cloud Storage is a managed service for storing unstructured data.Install with GCS dependencies:
Google El Carro Oracle Operator runs Oracle databases in Kubernetes.Install the python package:
Google Cloud Firestore is a NoSQL document database.Install the python package:
Google Cloud Firestore in Datastore mode.Install the python package:
Google Cloud Memorystore for Redis is a fully managed Redis service.Install the python package:
Google Cloud Spanner is a fully managed, globally distributed relational database service.Install the python package:
Google Cloud Speech-to-Text transcribes audio files.Install with Speech-to-Text dependencies:
Google Cloud Document AI is a Google Cloud 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
The GCS_OUTPUT_PATH
should be a path to a folder on GCS (starting with gs://
)
and a processor name should look like projects/PROJECT_NUMBER/locations/LOCATION/processors/PROCESSOR_ID
.
We can get it either programmatically or copy from the Prediction endpoint
section of the Processor details
tab in the Google Cloud Console.
Google Translate is a multilingual neural machine translation service developed by Google to translate text, documents and websites from one language into another.The
GoogleTranslateTransformer
allows you to translate text and HTML with the Google Cloud Translation API.
First, we need to install the langchain-google-community
with translate dependencies.
Google Cloud 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:
Google Cloud BigQuery, BigQuery is a serverless and cost-effective enterprise data warehouse in Google Cloud. Google Cloud BigQuery Vector Search BigQuery vector search lets you use GoogleSQL to do semantic search, using vector indexes for fast but approximate results, or using brute force for exact results.
It can calculate Euclidean or Cosine distance. With LangChain, we default to use Euclidean distance.We need to install several python packages.
Vector store using Memorystore for Redis.Install the python package:
Vector store using Cloud Spanner.Install the python package:
Vector store using Firestore.Install the python package:
Vector store using Cloud SQL for MySQL.Install the python package:
Vector store using Cloud SQL for PostgreSQL.Install the python package:
Google Cloud Vertex AI Vector Search from Google Cloud,
formerly known as Vertex AI Matching Engine
, provides the industry’s leading high-scale
low latency vector database. These vector databases are commonly
referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service.
Install the python package:
Vector search using Datastore for document storage.See usage example.
Alias for VectorSearchVectorStore
storing documents/index in GCS.
Build generative AI powered search engines using Vertex AI Search. from Google Cloud allows developers to quickly build generative AI powered search engines for customers and employees.See a usage example. Note:
GoogleVertexAISearchRetriever
is deprecated. Use the components below from langchain-google-community
.
Install the google-cloud-discoveryengine
package for underlying access.
Search, store, and manage documents using Document AI Warehouse.Note:
GoogleDocumentAIWarehouseRetriever
(from langchain
) is deprecated. Use DocumentAIWarehouseRetriever
from langchain-google-community
.
Requires installation of relevant Document AI packages (check specific docs).
Google Cloud Text-to-Speech is a Google Cloud service that enables developers to synthesize natural-sounding speech with 100+ voices, available in multiple languages and variants. It applies DeepMind’s groundbreaking research in WaveNet and Google’s powerful neural networks to deliver the highest fidelity possible.Install required packages:
google-search-results
package and SerpApi key.
google-search-results
package and SerpApi key.
google-search-results
package and SerpApi key.
googlemaps
package and a Google Maps API key.
google-search-results
package and SerpApi key.
GOOGLE_API_KEY
and GOOGLE_CSE_ID
.
Install langchain-google-community
:
google-search-results
package and SerpApi key.
Google Gmail is a free email service provided by Google.
This toolkit works with emails through the Gmail API
.
tools.yaml
to define your tools, and then execute toolbox to start the server:
Chat memory using AlloyDB.Install the python package:
Chat memory using Cloud SQL for PostgreSQL.Install the python package:
Chat memory using Cloud SQL for MySQL.Install the python package:
Chat memory using Cloud SQL for SQL Server.Install the python package:
Chat memory using Cloud Spanner.Install the python package:
Chat memory using Memorystore for Redis.Install the python package:
Chat memory using Cloud Bigtable.Install the python package:
Chat memory using Firestore.Install the python package:
Chat memory using Firestore in Datastore mode.Install the python package:
Chat memory using Oracle databases run via El Carro.Install the python package:
Callback Handler that tracks VertexAI
usage info.
Requires langchain-google-vertexai
.
langchain-google-vertexai
.
Pair-wise evaluation using Vertex AI models.
Evaluate a single prediction string using Vertex AI models.
Google Drive file storage. Currently supports Google Docs.Install with Drive dependencies:
Google ScaNN
(Scalable Nearest Neighbors) is a python package.
ScaNN
is a method for efficient vector similarity search at scale.
ScaNN
includes search space pruning and quantization for Maximum Inner
Product Search and also supports other distance functions such as
Euclidean distance. The implementation is optimized for x86 processors
with AVX2 support. See its Google Research github
for more details.
Install the scann
package:
google-search-results
package and SerpApi key.
google-search-results
package and SerpApi key.
google-search-results
package and SerpApi key.
googlemaps
package and a Google Maps API key.
google-search-results
package and SerpApi key.
GOOGLE_API_KEY
and GOOGLE_CSE_ID
.
Install langchain-google-community
:
google-search-results
package and SerpApi key.
Google Gmail is a free email service provided by Google.
This toolkit works with emails through the Gmail API
.
Load chat history from Gmail threads.Install with GMail dependencies:
SearchApi provides API access to Google search, YouTube, etc. Requires langchain-community
.
See usage examples and authorization instructions.
SerpApi provides API access to Google search results. Requires langchain-community
.
See a usage example and authorization instructions.
Google Serper provides API access to Google search results. Requires langchain-community
.
See a usage example and authorization instructions.
Search YouTube videos without the official API. Requires youtube_search
package.
Download audio from YouTube videos. Requiresyt_dlp
,pydub
,librosa
.
Load video transcripts. Requires youtube-transcript-api
.