> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-docs-zh.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Jigsawstack 提示引擎集成

> 使用 LangChain JavaScript 与 Jigsawstack prompt engine LLM 集成。

LangChain.js 支持调用 JigsawStack [提示词引擎](https://docs.jigsawstack.com/api-reference/prompt-engine/run-direct) LLMs。

## 安装

* 设置一个 [账户](https://jigsawstack.com/dashboard)（免费开始使用）
* 创建并获取您的 [API key](https://jigsawstack.com/dashboard)

## 凭证

```bash theme={null}
export JIGSAWSTACK_API_KEY="your-api-key"
```

## 使用

> [!TIP]
>
> 请参考 [安装 LangChain 包的通用说明部分](https://langchain-docs-zh.mintlify.site/langchain/oss/langchain/install.md).

```bash npm theme={null}
npm install @langchain/jigsawstack
```

```ts theme={null}
import { JigsawStackPromptEngine } from "@langchain/jigsawstack";

export const run = async () => {
  const model = new JigsawStackPromptEngine();
  const res = await model.invoke(
    "Tell me about the leaning tower of pisa?\nAnswer:"
  );
  console.log({ res });
};
```

## 相关

* [模型指南](https://langchain-docs-zh.mintlify.site/langchain/oss/langchain/models.md)

***

> 官方原文：[src/oss/javascript/integrations/llms/jigsawstack.mdx](https://github.com/langchain-ai/docs/blob/main/src/oss/javascript/integrations/llms/jigsawstack.mdx) · 非官方翻译，译文由 AI 生成，以英文原文为准。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.