跳到主要内容

Petals

本页介绍了如何在 LangChain 中使用 Petals 生态系统。它分为两部分:安装和设置,然后是特定 Petals 封装器的参考。

安装和设置

  • 使用 pip install petals 安装
  • 获取 Hugging Face API 密钥并将其设置为环境变量 (HUGGINGFACE_API_KEY)

封装器

LLM

存在 Petals LLM 封装器,您可以使用以下方式访问:

from langchain_community.llms import Petals
API 参考:Petals

此页是否对您有帮助?