Anyscale
Anyscale is a platform to run, fine tune and scale LLMs via production-ready APIs. Anyscale Endpoints serve many open-source models in a cost-effective way.
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 参考:Anyscale
聊天模型
查看一个 使用示例。
from langchain_community.chat_models.anyscale import ChatAnyscale
API 参考:ChatAnyscale
嵌入
查看一个 使用示例。
from langchain_community.embeddings import AnyscaleEmbeddings
API 参考:AnyscaleEmbeddings