Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Perplexity plugin for LiveKit Agents

Support for Perplexity LLMs via the OpenAI-compatible chat completions endpoint at https://api.perplexity.ai.

See https://docs.livekit.io/agents/models/llm/perplexity/ for more information.

Installation

pip install livekit-plugins-perplexity

Pre-requisites

You'll need an API key from Perplexity. It can be passed directly or set as the PERPLEXITY_API_KEY environment variable.

Usage

from livekit.plugins import perplexity

llm = perplexity.LLM(
    model="sonar-pro",
    # api_key picked up from PERPLEXITY_API_KEY if omitted
)

The plugin reuses the OpenAI plugin's chat completions transport with base_url="https://api.perplexity.ai" and forwards an X-Pplx-Integration attribution header on every outgoing request.

Agent API usage

Perplexity's Agent API is compatible with OpenAI's Responses API and is available through the perplexity.responses submodule.

from livekit.plugins import perplexity

llm = perplexity.responses.LLM(
    model="perplexity/sonar",
    # api_key picked up from PERPLEXITY_API_KEY if omitted
)

The Responses LLM uses base_url="https://api.perplexity.ai/v1", disables websocket transport, and sends the same X-Pplx-Integration attribution header on its OpenAI-compatible client.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_perplexity-1.6.11rc1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file livekit_plugins_perplexity-1.6.11rc1.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_perplexity-1.6.11rc1.tar.gz
Algorithm Hash digest
SHA256 ef4b1cd1f98939425489640e613a2d10a318a565a7c52b7d0177aa486636aa99
MD5 3a0e49949840cf3070b64a9a8abb2691
BLAKE2b-256 d0f80b6cba9c317150bf997e092ef55764a984ec295e64f215db6d7d35a1f791

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_perplexity-1.6.11rc1.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_perplexity-1.6.11rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_perplexity-1.6.11rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc9ee1a5bce85d3a8212ba14ecf351c89b3ec4978c1d2c9f53b4a757005f1c2d
MD5 a46a33bd1a287fecd5917ccff255fd2e
BLAKE2b-256 f9802a36907bd3e6716f16641a1b84ec40925b46049da793c11893102afea894

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_perplexity-1.6.11rc1-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page