Skip to content

langchain-google-genai

PyPI - Version PyPI - License PyPI - Downloads

LangChain integration for Google's Generative AI models, providing access to Gemini models via both the Gemini Developer API and Vertex AI.

Vertex AI consolidation

As of langchain-google-genai 4.0.0, this package uses the consolidated google-genai SDK instead of the legacy google-ai-generativelanguage SDK.

This migration brings support for Gemini models both via the Gemini Developer API and Gemini API in Vertex AI, superseding certain classes in langchain-google-vertexai, such as ChatVertexAI. Refer to the provider docs and release notes for more information.

Modules

Usage documentation

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).

  • ChatGoogleGenerativeAI


    Gemini chat models.

    Reference

  • GoogleGenerativeAI


    (Legacy) Google text completion abstraction.

    Reference

  • GoogleGenerativeAIEmbeddings


    Gemini embedding models.

    Reference