import { VertexAI } from "@langchain/google-vertexai";// Or uncomment this line if you're using the web version:// import { VertexAI } from "@langchain/google-vertexai-web";const model = new VertexAI({ authOptions: { credentials: {"type":"service_account","project_id":"YOUR_PROJECT-12345",...}, },});
如果您想要自动跟踪您的模型调用,您也可以通过取消注释以下内容来设置您的 LangSmith API 密钥: