gemini-1.5-pro
, gemini-2.0-flash-exp
, etc.
It also provides some non-Google models such as Anthropic’s Claude.
This will help you getting started with ChatVertexAI
chat models. For detailed documentation of all ChatVertexAI
features and configurations head to the API reference.
Class | Package | Local | Serializable | PY support | Package downloads | Package latest |
---|---|---|---|---|---|---|
ChatVertexAI | @langchain/google-vertexai | ❌ | ✅ | ✅ |
Tool calling | Structured output | JSON mode | Image input | Audio input | Video input | Token-level streaming | Token usage | Logprobs |
---|---|---|---|---|---|---|---|---|
✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
ChatVertexAI
models you’ll need to setup Google VertexAI in your Google Cloud Platform (GCP) account, save the credentials file, and install the @langchain/google-vertexai
integration package.
GOOGLE_APPLICATION_CREDENTIALS
environment variable:
GOOGLE_VERTEX_AI_WEB_CREDENTIALS
environment variable as a JSON stringified object, and install the @langchain/google-vertexai-web
package:
@langchain/google-vertexai
or @langchain/google-vertexai-web
package.
You can then go to the Express Mode API Key page and set your API Key in the GOOGLE_API_KEY
environment variable:
ChatVertexAI
integration lives in the @langchain/google-vertexai
package:
gemini-2.0-flash-exp
.
You can choose to either ground using Google Search or by using a custom data store. Here are examples of both:
ID | Date | Team 1 | Score | Team 2 |
---|---|---|---|---|
3001 | 2023-09-07 | Argentina | 1 - 0 | Ecuador |
3002 | 2023-09-12 | Venezuela | 1 - 0 | Paraguay |
3003 | 2023-09-12 | Chile | 0 - 0 | Colombia |
3004 | 2023-09-12 | Peru | 0 - 1 | Brazil |
3005 | 2024-10-15 | Argentina | 6 - 0 | Bolivia |
projectId
and datastoreId
)