Anyscale
Anyscale 是一个通过生产就绪的 API 运行、微调和扩展 LLM 的平台。 Anyscale Endpoints 以经济高效的方式服务于许多开源模型。
Anyscale
还提供了一个关于如何使用 Anyscale 设置 LangChain 以构建高级聊天代理的示例。
安装和设置
- 获取 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 参考:Anyscale
聊天模型
查看使用示例。
from langchain_community.chat_models.anyscale import ChatAnyscale
API 参考:ChatAnyscale
嵌入
查看使用示例。
from langchain_community.embeddings import AnyscaleEmbeddings
API 参考:AnyscaleEmbeddings