跳到主要内容
Anyscale 是一个通过生产就绪 API 运行、微调和扩展大型语言模型 (LLM) 的平台。Anyscale Endpoints 以经济高效的方式提供许多开源模型。
Anyscale 还提供了一个示例,说明如何使用 Anyscale 为高级聊天代理设置 LangChain

安装和设置

  • 获取 Anyscale 服务 URL、路由和 API 密钥,并将它们设置为环境变量(ANYSCALE_SERVICE_URLANYSCALE_SERVICE_ROUTEANYSCALE_SERVICE_TOKEN)。
  • 请参阅Anyscale 文档了解更多详情。
我们需要安装 openai
pip install openai

LLM

请参阅使用示例
from langchain_community.llms.anyscale import Anyscale

嵌入

请参阅使用示例
from langchain_community.embeddings import AnyscaleEmbeddings

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