LangChain Google Generative AI integration (VertexAI).
This module contains the LangChain integrations for Vertex AI service - Google foundational models and third-party models available on Vertex Model Garden.
Supported integrations
VertexAIImageCaptioning,
VertexAIImageCaptioningChat, VertexAIImageEditorChat,
VertexAIImageGeneratorChat, VertexAIVisualQnAChat.model_garden.ChatAnthropicVertex,
model_garden_maas.VertexModelGardenLlama,
model_garden_maas.VertexModelGardenMistral.VertexAIModelGarden.VectorSearchVectorStore,
VectorSearchVectorStoreDatastore, VectorSearchVectorStoreGCS.VertexPairWiseStringEvaluator,
VertexStringEvaluator.You need to enable required Google Cloud APIs (depending on the integration you're using) and set up credentials by either:
GOOGLE_APPLICATION_CREDENTIALS environment variableThis codebase uses the google.auth library which first looks for the application
credentials variable mentioned above, and then looks for system-level auth.
Evaluate the perplexity of a predicted string.
Evaluate the perplexity of a predicted string.
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 invocation and matches them to the pydantic schema provided.
An exception will be raised if the function call does not match the provided schema.
Large language models served from Vertex AI Model Garden.
Stores documents in Google Cloud DataStore.
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.
VertexAI VectorStore that handles the search and indexing using Vector Search
and stores the documents in Google Cloud Storage.
VectorSearch with DataStore document storage.
Alias of VectorSearchVectorStore for consistency with the rest of vector
stores with different document storage backends.
Implementation of the Image Captioning model as an LLM.
Implementation of the Image Captioning model as a chat.
Given an image and a prompt, edits the image.
Currently only supports mask free editing.
Generates an image from a prompt.
Chat implementation of a visual QnA model.
Google Cloud Vertex AI chat model integration.
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 supports both the Gemini Developer API and
Vertex AI Platform as backend options.
Wrapper around Google VertexAI chat-based models.
Vertex supports both v1 and v1beta1 endpoints (endpoint_version parameter).
DEPRECATED
DEPRECATED
Model profile data. All edits should be made in profile_augmentations.toml.