Integrations: Chat Models
LangChain offers a number of Chat Models implementations that integrate with various model providers. These are:
OpenAI
import { ChatOpenAI } from "langchain/chat_models";
// Expects an OpenAI API key to be set in the env variable OPENAI_API_KEY
const model = new ChatOpenAI({ temperature: 0.9 });
Anthropic
import { ChatAnthropic } from "langchain/chat_models";
// Expects an Anthropic API key to be set in the env variable ANTHROPIC_API_KEY
const model = new ChatAnthropic({ temperature: 0.9 });