跳到主要内容
Open on GitHub

Petals

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

安装与设置

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

包装器

LLM

存在一个 Petals LLM 封装器,您可以通过以下方式访问它

from langchain_community.llms import Petals
API 参考:Petals