Skip to content

perplexity-ai-toolkit

Python

Python wrapper and CLI for Perplexity Sonar.

A lightweight Python API wrapper and CLI for Perplexity's Sonar language models built on LLama-3.1. Supports chatbots, text generation, and real-time web search.

python perplexity ai cli

[features]

Real-Time Search

Conduct web searches with precise responses

Conversational AI

Interactive chatbots and assistants

Streaming Output

Real-time response streaming

Lightweight

Only requires requests package

[install]

git clone https://github.com/RMNCLDYO/perplexity-ai-toolkit.git
cd perplexity-ai-toolkit
pip install -r requirements.txt

[usage]

# CLI
python cli.py --chat
python cli.py --text --prompt "Search the web for..."

# Python
from perplexity import Chat, Text
Chat().run()

[requirements]

[license]

This project is licensed under the MIT license.

[links]