Skip to main content

AlephAlpha

LangChain.js 支持 AlephAlpha 的 Luminous 系列模型。你需要在他们的网站上注册获取 API 密钥

以下是一个示例:

:::提示 请参阅安装集成包的一般说明部分。 :::

npm install @langchain/community @langchain/core
import { AlephAlpha } from "@langchain/community/llms/aleph_alpha";

const model = new AlephAlpha({
aleph_alpha_api_key: "YOUR_ALEPH_ALPHA_API_KEY", // Or set as process.env.ALEPH_ALPHA_API_KEY
});

const res = await model.invoke(`Is cereal soup?`);

console.log({ res });

/*
{
res: "\nIs soup a cereal? I don’t think so, but it is delicious."
}
*/

API Reference:

  • AlephAlpha from @langchain/community/llms/aleph_alpha

相关内容


Was this page helpful?


You can also leave detailed feedback on GitHub.