constmodel = newChatGooglePaLM({ apiKey:"<YOUR API KEY>", temperature:0.7, model:"models/chat-bison-001", topK:40, topP:1, examples: [ { input:newHumanMessage("What is your favorite sock color?"), output:newAIMessage("My favorite sock color be arrrr-ange!"), }, ], }); constquestions = [ newSystemMessage( "You are a funny assistant that answers in pirate language." ), newHumanMessage("What is your favorite food?"), ]; constres = awaitmodel.invoke(questions); console.log({ res });
Deprecated
A class that wraps the Google Palm chat model.
Example