langchain-google-genai 4.0.0 版本起,此包使用整合的 google-genai SDK,现支持 Gemini 开发者 API 和 Gemini 企业智能体平台 后端。langchain-google-vertexai 包仍受支持,用于 Gemini 企业智能体平台特定功能(模型花园、向量搜索、评估服务等)。请参阅 完整公告和迁移指南。Google Generative AI (Gemini API & Gemini Enterprise Agent Platform)
Google Generative AI (Gemini API & Gemini Enterprise Agent Platform)
- Gemini 开发者 API:使用 API 密钥快速设置,适合个人开发者和快速原型设计
- Gemini 企业智能体平台:具有 Google Cloud 集成的企业功能(需要 GCP 项目)
langchain-google-genai 包用于对话模型、LLM 和嵌入。查看集成。Google Cloud (Gemini Enterprise Agent Platform Services)
Google Cloud (Gemini Enterprise Agent Platform Services)
langchain-google-vertexai 包用于平台服务,并使用特定包(例如 langchain-google-community、langchain-google-cloud-sql-pg)用于其他云服务,如数据库和存储。查看集成。Google 生成式 AI
使用统一的langchain-google-genai 包,通过 Gemini 开发者 API 或 Gemini 企业智能体平台 访问 Google Gemini 模型。
对话模型
ChatGoogleGenerativeAI
LLM
GoogleGenerativeAI
嵌入模型
GoogleGenerativeAIEmbeddings
Google Cloud
访问 Gemini 企业智能体平台特定服务,包括模型花园(Llama、Mistral、Anthropic)、向量搜索、评估服务以及专业视觉模型。ChatGoogleGenerativeAI 从 langchain-google-genai。以下类专注于 不在整合 SDK 中提供的 Gemini 企业智能体平台服务。对话模型
ChatAnthropicVertex
ChatVertexAI (deprecated)
ChatVertexAI (deprecated)
ChatGoogleGenerativeAI 用于 Gemini 模型。VertexModelGardenLlama
VertexModelGardenLlama
VertexModelGardenMistral
VertexModelGardenMistral
GemmaChatLocalHF
GemmaChatLocalHF
GemmaChatLocalKaggle
GemmaChatLocalKaggle
GemmaChatVertexAIModelGarden
GemmaChatVertexAIModelGarden
VertexAIImageCaptioningChat
VertexAIImageCaptioningChat
VertexAIImageEditorChat
VertexAIImageEditorChat
VertexAIImageGeneratorChat
VertexAIImageGeneratorChat
VertexAIVisualQnAChat
VertexAIVisualQnAChat
LLM
(旧版)字符串输入、字符串输出的 LLM 接口。VertexAIModelGarden
VertexAI (deprecated)
VertexAI (deprecated)
GoogleGenerativeAI 用于 Gemini 模型。Gemma local from Hugging Face
Gemma local from Hugging Face
Gemma local from Kaggle
Gemma local from Kaggle
Gemma on Gemini Enterprise Agent Platform Model Garden
Gemma on Gemini Enterprise Agent Platform Model Garden
Gemini Enterprise Agent Platform image captioning
Gemini Enterprise Agent Platform image captioning
嵌入模型
VertexAIEmbeddings (deprecated)
VertexAIEmbeddings (deprecated)
GoogleGenerativeAIEmbeddings。文档加载器
AlloyDB for PostgreSQL
BigQuery
Bigtable
Cloud SQL for MySQL
Cloud SQL for SQL Server
Cloud SQL for PostgreSQL
Cloud Storage (directory)
Cloud Storage (file)
El Carro for Oracle Workloads
Firestore (Native Mode)
Firestore (Datastore Mode)
Memorystore for Redis
Spanner
Speech-to-Text
Cloud Vision loader
Cloud Vision loader
文档转换器
Document AI
Google Translate
向量存储
使用 Google Cloud 数据库和 Gemini Enterprise Agent 平台上的向量搜索来存储和搜索向量。AlloyDB for PostgreSQL
BigQuery Vector Search
Memorystore for Redis
Spanner
Bigtable
Firestore (Native Mode)
Cloud SQL for MySQL
Cloud SQL for PostgreSQL
Vector Search on Gemini Enterprise Agent Platform
Vector Search on Gemini Enterprise Agent Platform + Datastore
检索器
Agent Search on Gemini Enterprise Agent Platform
Document AI Warehouse
工具
将智能体与各种 Google Cloud 服务集成。Text-to-Speech
回调
跟踪 LLM/对话模型的使用情况。Gemini Enterprise Agent Platform callback handler
Gemini Enterprise Agent Platform callback handler
VertexAI 使用信息。Google BigQuery
Google BigQuery
评估器
使用 Gemini Enterprise Agent 平台评估模型输出。VertexPairWiseStringEvaluator
VertexPairWiseStringEvaluator
VertexStringEvaluator
VertexStringEvaluator
其他 Google 产品
核心云平台之外的各种 Google 服务集成。文档加载器
Google Drive
检索器
Google Drive
工具
Google Search
Google Drive
MCP
MCP Toolbox
工具包
Gmail
第三方集成
通过非官方的第三方 API 访问 Google 服务。搜索
cloro
官方原文:src/oss/python/integrations/providers/google.mdx · 非官方翻译,译文由 AI 生成,以英文原文为准。