Skip to main content
Open on GitHub

Anyscale

Anyscale 是一个通过生产级 API 来运行、微调和扩展 LLM 的平台。 Anyscale Endpoints 以经济高效的方式提供许多开源模型。

Anyscale 还提供了一个关于如何设置 LangChain 与 Anyscale 集成以构建高级聊天代理的示例。

安装和设置​

  • 获取 Anyscale 服务 URL、路由和 API 密钥,并将它们设置为环境变量(ANYSCALE_SERVICE_URL、ANYSCALE_SERVICE_ROUTE、ANYSCALE_SERVICE_TOKEN)。
  • 有关更多详细信息,请参阅 Anyscale 文档。

我们需要安装 openai 包:

pip install openai

LLM​

请参阅使用示例。

from langchain_community.llms.anyscale import Anyscale
API Reference:Anyscale

Chat Models​

请参阅使用示例。

from langchain_community.chat_models.anyscale import ChatAnyscale
API Reference:ChatAnyscale

Embeddings​

请参阅使用示例。

from langchain_community.embeddings import AnyscaleEmbeddings
API Reference:AnyscaleEmbeddings