DeepInfra
DeepInfra allows us to run the latest machine learning models with ease. DeepInfra takes care of all the heavy lifting related to running, scaling and monitoring the models. Users can focus on your application and integrate the models with simple REST API calls.
DeepInfra provides examples of integration with LangChain.
此页面介绍如何在 LangChain 中使用 DeepInfra 生态系统。
分为两部分:安装和设置,以及对特定 DeepInfra 包装器的引用。
安装与设置
- 从这个链接获取你的DeepInfra API密钥 这里。
- 获取 DeepInfra API 密钥并将其设置为环境变量 (
DEEPINFRA_API_TOKEN)
可用模型
DeepInfra 提供一系列可直接部署的开源大型语言模型。
您可以查看 请求和响应参数列表。
聊天模型 遵循OpenAI API
LLM
查看一个 使用示例。
from langchain_community.llms import DeepInfra
API 参考:DeepInfra
嵌入
查看一个 使用示例。
from langchain_community.embeddings import DeepInfraEmbeddings
API 参考:DeepInfraEmbeddings
聊天模型
查看一个 使用示例。
from langchain_community.chat_models import ChatDeepInfra
API 参考:ChatDeepInfra