本页还没有译文
本页 10 段还没译成Español,下面显示的是英文原文。Yandexgpt integration
还没翻译译自英文(docs.langchain.com)本页 10 段都还没译
LangChain.js supports calling YandexGPT LLMs.
Setup
First, you should create service account with the ai.languageModels.user role.
Next, you have two authentication options:
- IAM token.
You can specify the token in a constructor parameter
iam_tokenor in an environment variableYC_IAM_TOKEN. - API key
You can specify the key in a constructor parameter
api_keyor in an environment variableYC_API_KEY.
Usage
npm install @langchain/yandex @langchain/coreimport { YandexGPT } from "@langchain/yandex/llms";
const model = new YandexGPT();
const res = await model.invoke(['Translate "I love programming" into French.']);
console.log({ res });Related
AI 翻译查看英文原文