Skip to main content

Petals

This page covers how to use the Petals ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Petals wrappers.

Installation and Setupโ€‹

  • Install with pip install petals
  • Get a Hugging Face api key and set it as an environment variable (HUGGINGFACE_API_KEY)

Wrappersโ€‹

LLMโ€‹

There exists an Petals LLM wrapper, which you can access with

from langchain_community.llms import Petals
API Reference:Petals

Was this page helpful?