Skip to main content

Unofficial Perplexity.ai API Client

Project description

Unofficial Perplexity API Client

This is an UNOFFICIAL Perplexity API Client for interaction with Perplexity AI API.

Usage

from peplexity_client.client import PerplexityClient, PerplexityModels


client = PerplexityClient(api_key="YOUR-API-KEY")
messages = [
  {"role": "user", "text": "Give me 20 most visited places on Earth"}
]

# Here we can use online model or leave it with the default mistral-7b-instruct model
places = client.chat_completion(messages=messages, model=PerplexityModels.PPLX_70B_ONLINE)

Project details


Download files

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

Source Distribution

perplexity_client-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

perplexity_client-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file perplexity_client-0.1.1.tar.gz.

File metadata

  • Download URL: perplexity_client-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for perplexity_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 13a34be6f0c8cc03028b1821cf4ee6b17d6c48e1375bceb3a1250efdb2e4dacb
MD5 033e528d732348b048cb883aab66098f
BLAKE2b-256 a269c8f8e1aa2df111fa8daca621b460c796ca1d3f669068496708494eb096fe

See more details on using hashes here.

File details

Details for the file perplexity_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for perplexity_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7d23bf6fd8f158925e8338f553fd2fb608de2f930eaa2b50189e97a78a7af46
MD5 5d9826e819c9fd5bd54cb62a1e1a8ba6
BLAKE2b-256 bcfaca13fa3474f217439a5ccff60dfa5f06ac9992093d2df580bac3c14adbd6

See more details on using hashes here.

Supported by

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