跳到主要内容
注意:这是一个社区构建的集成,并非 Raycast 官方支持。
您可以在 Raycast 环境中使用 LangChain 的 RaycastAI 类,以增强您的 Raycast 扩展的 LangChain 功能。
  • 截至 2023 年 8 月,RaycastAI 类仅在 Raycast 环境中对 Raycast Pro 用户可用。您可以在此处查看如何为 Raycast 创建扩展。
  • 每个 Raycast Pro 用户每分钟的请求速率限制约为 10 次。如果超出此限制,您将收到错误。您可以如示例所示,通过将 rateLimitPerMinute 传递给 RaycastAI 构造函数来设置所需的每分钟请求限制,因为此速率限制将来可能会更改。
有关安装 LangChain 软件包的一般说明,请参阅此部分
npm
npm install @langchain/community @langchain/core
import { RaycastAI } from "@langchain/community/llms/raycast";

import { Tool } from "@langchain/core/tools";

const model = new RaycastAI({
  rateLimitPerMinute: 10, // It is 10 by default so you can omit this line
  model: "<model_name>",
  creativity: 0, // `creativity` is a term used by Raycast which is equivalent to `temperature` in some other LLMs
});

以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.