Prefer @langchain/yandex

const chat = new ChatYandexGPT({});
// The assistant is set to translate English to French.
const res = await chat.call([
new SystemMessage(
"You are a helpful assistant that translates English to French."
),
new HumanMessage("I love programming."),
]);
console.log(res);

Hierarchy (view full)

Constructors

Properties

maxTokens: number = 1700
model: string = "general"
temperature: number = 0.6
apiKey?: string
iamToken?: string