LangChain integration for Google's Vertex AI Platform.
As of langchain-google-vertexai 3.2.0, certain classes are deprecated in favor of equivalents in langchain-google-genai 4.0.0, which uses the consolidated google-genai SDK.
Refer to the provider docs and release notes for more information.
Refer to the docs for a high-level guide on how to use each module. These reference pages contain auto-generated API documentation for each module, focusing on the "what" rather than the "how" or "why" (i.e. no end-to-end tutorials or conceptual overviews).
Callback Handler that tracks VertexAI info.
Large language models served from Vertex AI Model Garden.
Implementation of the Image Captioning model as an LLM.
Implementation of the Image Captioning model as a chat.
Chat implementation of a visual QnA model.
Generates an image from a prompt.
Given an image and a prompt, edits the image.
Currently only supports mask free editing.
Parse an output as a pydantic object.
This parser is used to parse the output of a chat model that uses Google Vertex function format to invoke functions.
The parser extracts the function call invoc
Image Loading Route.
Loads image bytes from multiple sources given a string.
Currently supported:
Class in charge of building all Google Cloud SDK Objects needed to build
VectorStores from project_id, credentials or other specifications.
Abstracts away the authentication layer.
Abstract interface of a key, text storage for retrieving documents.
Stores documents in Google Cloud Storage.
For each pair id, document_text the name of the blob will be {prefix}/{id}
stored in plain text format.
Stores documents in Google Cloud DataStore.
VertexAI VectorStore that handles the search and indexing using Vector Search
and stores the documents in Google Cloud Storage.
Alias of VectorSearchVectorStore for consistency with the rest of vector
stores with different document storage backends.
VectorSearch with DataStore document storage.
Abstract implementation of a similarity searcher.
Class to interface with Vector Search indexes (v1) and collections (v2).
Integration for Llama 3.1 on Google Cloud Vertex AI Model-as-a-Service.
More information
Evaluate the perplexity of a predicted string.
Evaluate the perplexity of a predicted string.
Grade, tag, or otherwise evaluate predictions relative to their inputs and/or reference labels.
Compare the output of two models (or two outputs of the same model).
Google Cloud VertexAI embedding models.
Google Vertex AI text completion large language models (legacy LLM).
Added in langchain-google-genai 4.0.0.
ChatGoogleGenerativeAI now sup
Google Cloud Vertex AI chat model integration.
Creates a cache for content in some model.
Create a retry decorator for a given LLM and provided a list of error types.
Creates a retry decorator for Vertex / Palm LLMs.
Raise ImportError related to Vertex SDK being not available.
Returns a custom user agent header.
Returns a ClientInfo object with a custom user agent header.
Loads an Image from GCS.
Cut off the text as soon as any stop words occur.
Given an OpenAPI schema with a property $defs replaces all occurrences of
referenced items in the dictionary.
Encodes image bytes into a b64 encoded string.
Create a dictionary that can be part of a message content list.
Create a dictionary that can be part of a message content list.
Parses an image string from a dictionary with the correct format.
Parses an string from a dictionary or string with the correct format.
Updates an index using stream updating.
Updates an index using batch updating.
Converts triplets id, embedding, metadata into IndexDataPoints instances.
Only metadata with values of type string, numeric or list of string will be considered for the filtering.
Given a list of datapoints, generates a list of records in the input format required to do a bactch update.
Upserts data points into a Vertex AI Vector Search 2.0 Collection.
Searches for neighbors in a Vertex AI Vector Search 2.0 Collection.
Deletes data points from a Vertex AI Vector Search 2.0 Collection.
Gets datapoint IDs that match a filter in a Vertex AI Vector Search 2.0.
Retrieves IDs from the Collection matching the given filter.
Performs semantic search in a Vertex AI Vector Search 2.0 Collection.
Semantic search automatically generates embeddings from the search text using Vertex AI models, so you don't need to manually cre
Performs text search in a Vertex AI Vector Search 2.0 Collection.
Text search performs traditional keyword/full-text search on data fields without using embeddings.
Note: Text search does not suppor
Performs hybrid search combining semantic and text search with RRF.
Hybrid search runs both semantic search (with auto-generated embeddings) and text search (keyword matching) in parallel, then combi
Return a corresponding Vertex MaaS instance.
A factory method based on model's name.
Use tenacity to retry the async completion call.
Get the appropriate function output parser given the user functions.
Create a runnable sequence that uses OpenAI functions.
LangChain Google Generative AI integration (VertexAI).
This module contains the LangChain integrations for Vertex AI service - Google foundational models and thi
DEPRECATED
Wrapper around Google VertexAI chat-based models.
Vertex supports both v1 and v1beta1 endpoints (endpoint_version parameter).
DEPRECATED
Model profile data. All edits should be made in profile_augmentations.toml.
Anthropic-on-Vertex model profile data.
_profiles.py is auto-generated from models.dev via the langchain-profiles
CLI tool — do not edit it manually. Apply manual overrides in
`profile_augmentati