Skip to content
pubscout

langchain_google

0.8.0, released 3 months ago by langchaindart.dev

LangChain.dart integration module for Google AI, Gemini, and VertexAI.

WASM-ready
$ flutter pub add langchain_google
Source repository

What it does

Integrates Google generative models, text chat, embeddings, and vector stores into the LangChain.dart ecosystem. It provides wrappers for Gemini, GCP Vertex AI, and Vertex AI Matching Engine.

AI-written summary of version 0.8.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building LangChain.dart applications that leverage Google Gemini models
  • Using GCP Vertex AI text and chat models or embeddings in Dart
  • Implementing vector storage with Vertex AI Matching Engine

Skip it when

  • Not using the LangChain.dart framework
  • Building an application that requires direct use of native Firebase Vertex AI without LangChain

Strengths

  • Seamless integration with LangChain.dart
  • Supports a wide range of Google AI services including Gemini and Vertex AI
  • Keeps pace with official Google AI API changes

Weaknesses

  • Tightly coupled to the LangChain.dart framework
  • Requires managing API keys and Google Cloud project credentials

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
10

Requires obtaining API keys or setting up Google Cloud authentication for Vertex AI and configuring dependencies.

final chatModel = ChatGoogleGenerativeAI(apiKey: 'your-api-key');

Alternatives

Packages that do the same job and could replace langchain_google.

  • firebase_ai

    If you specifically need Firebase Vertex AI integrations within your app.

Works with

Packages commonly used together with langchain_google: ones it builds on, ones built on it, and its own family.