Skip to main content

RaycastAI

注意:这是一个社区构建的集成,Raycast 官方不支持。

¥Note: This is a community-built integration and is not officially supported by Raycast.

你可以在 Raycast 环境 中使用 LangChain 的 RaycastAI 类,通过 Langchain 的功能增强你的 Raycast 扩展。

¥You can utilize the LangChain's RaycastAI class within the Raycast Environment to enhance your Raycast extension with Langchain's capabilities.

  • RaycastAI 类仅在 Raycast 环境中可用,并且自 2023 年 8 月起仅供 Raycast 专业版 用户使用。你可以查看如何为 Raycast 此处 创建扩展。

    ¥The RaycastAI class is only available in the Raycast environment and only to Raycast Pro users as of August 2023. You may check how to create an extension for Raycast here.

  • 每个 Raycast Pro 用户每分钟的请求速率限制约为 10 次。如果超过此限制,你将收到错误。你可以像示例中所示,通过将 rateLimitPerMinute 传递给 RaycastAI 构造函数来设置所需的 rpm 限制,因为此速率限制将来可能会发生变化。

    ¥There is a rate limit of approx 10 requests per minute for each Raycast Pro user. If you exceed this limit, you will receive an error. You can set your desired rpm limit by passing rateLimitPerMinute to the RaycastAI constructor as shown in the example, as this rate limit may change in the future.

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
});

¥Related