Live code for talk given at SeattleJS Conf 2023 on Understanding LangChain Agents and Tools in JS with Twilio SMS
You will need an OpenAI API key, and can also use a Cohere API key by importing a Cohere model with import { Cohere } from "langchain/llms/cohere"
and replacing const model = new OpenAI({temperature:0.9});
with const model = new Cohere({temperature:0.9});
.
You will also need a SerpAPI API key for a LangChain tool to search the web. It is free!