Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

perplexityai

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perplexityai

A simple module to use Perplexity AI in Python.

  • 1.0.5
  • Source
  • PyPI
  • Socket score

Maintainers
1

PyPI Downloads Status

perplexityai

A simple module to use Perplexity AI in Python.

Get started:

python -m pip install -U perplexityai

Join my Discord server for live chat, support, or if you have any issues with this package.

Support this repository:

  • Star the project: Star this repository. It means a lot to me! 💕
  • 🎉 Join my Discord Server: Chat with me and others. Join here:

DiscordWidget

Example:

Perplexity:

from perplexityai import Perplexity

prompt = input("👦: ")
for a in Perplexity().generate_answer(prompt):
    print(f"🤖: {a['answer']}")

Labs:

"""
Models:
[
    "mixtral-8x7b-instruct",
    "llava-7b-chat",
    "llama-2-70b-chat",
    "codellama-34b-instruct",
    "mistral-7b-instruct",
    "pplx-7b-chat",
    "pplx-70b-chat",
    "pplx-7b-online",
    "pplx-70b-online",
]
"""
from perplexityai import Labs

prompt = input("👦: ")
for r in Labs().generate_answer(prompt, "MODEL"): 
    print(f"🤖: {r['output']}")

Thanks to nathanrchn's perplexityai for the original code.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc