Giter VIP home page Giter VIP logo

perplexity's Introduction

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.

perplexity's People

Contributors

ruu3f avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.