Our new LangChain Academy Course Deep Research with LangGraph is now live! Enroll for free.
OSS (v1-alpha)
LangChain and LangGraph
ai.languageModels.user
iam_token
YC_IAM_TOKEN
api_key
YC_API_KEY
npm install @langchain/yandex @langchain/core
import { ChatYandexGPT } from "@langchain/yandex/chat_models"; import { HumanMessage, SystemMessage } from "@langchain/core/messages"; const chat = new ChatYandexGPT(); const res = await chat.invoke([ new SystemMessage( "You are a helpful assistant that translates English to French." ), new HumanMessage("I love programming."), ]); console.log(res); /* AIMessage { lc_serializable: true, lc_kwargs: { content: "Je t'aime programmer.", additional_kwargs: {} }, lc_namespace: [ 'langchain', 'schema' ], content: "Je t'aime programmer.", name: undefined, additional_kwargs: {} } */