Skip to main content

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.7.1.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.

livekit_plugins_perplexity-1.7.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_perplexity-1.7.1.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_perplexity-1.7.1.tar.gz
Algorithm Hash digest
SHA256 dde846794ec6dcfd08f4a6776fe629108a665d8031c6bf995fba6fdc862c7792
MD5 57dc5497f44ca43b91acab3ef1deb095
BLAKE2b-256 aa128f5da2998f93e93977e7c3e38e4f6ab058d15dabf4d35801bc34e5c33449

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_perplexity-1.7.1.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.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_perplexity-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 820e4d74cb9e066b8b4c9c606ce244c1c4cf7d98c6a5b0228e2a070cf2163aa1
MD5 02beed646ee3b9409f31e339e158df18
BLAKE2b-256 5397f89d502fd669e516a80acff819c7d53031f1e2d6dad690eff1d3e92f47cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_perplexity-1.7.1-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.

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 files

1.7.0

2 files

1.6.10

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.6

2 files

1.6.5

2 files

1.6.4

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.18

2 files

1.5.17

2 files

1.5.16

2 files

1.5.15

2 files

1.5.14

2 files

1.5.13

2 files

1.5.12

2 files

1.5.11

2 files

1.5.10

2 files

1.5.9

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page