Skip to main content

Google

All functionality related to Google Cloud Platform

LLMs

Vertex AI

Access PaLM LLMs like text-bison and code-bison via Google Cloud.

import { GoogleVertexAI } from "langchain/llms/googlevertexai";

Model Garden

Access PaLM and hundreds of OSS models via Vertex AI Model Garden.

import { GoogleVertexAI } from "langchain/llms/googlevertexai";

Chat models

Vertex AI

Access PaLM chat models like chat-bison and codechat-bison via Google Cloud.

import { ChatGoogleVertexAI } from "langchain/chat_models/googlevertexai";

Vector Store

Vertex AI Vector Search, formerly known as Vertex AI Matching Engine, provides the industry's leading high-scale low latency vector database. These vector databases are commonly referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service.

import { MatchingEngine } from "langchain/vectorstores/googlevertexai";

Tools

  • Set up a Custom Search Engine, following these instructions
  • Get an API Key and Custom Search Engine ID from the previous step, and set them as environment variables GOOGLE_API_KEY and GOOGLE_CSE_ID respectively

There exists a GoogleCustomSearch utility which wraps this API. To import this utility:

import { GoogleCustomSearch } from "langchain/tools";

We can easily load this wrapper as a Tool (to use with an Agent). We can do this with:

const tools = [new GoogleCustomSearch({})];
// Pass this variable into your agent.