Skip to content

ShaneOss/perplexitylabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

perplexitylabs

A python api to use labs.perplexity.ai using Selenium.

Requirements:

pip install fake-useragent beautifulsoup4 selenium selenium-wire

Usage

You can import the Perplexity class and use it like this:

from Perplexity_Selenium import Perplexity

perplexity = Perplexity()
answer = perplexity.search("What is the meaning of life?")
print(answer)

The model used can be updated in Perplexity.py

#Available Models
# codellama-34b-instruct
# llama-2-7b-chat
# llama-2-13b-chat
# llama-2-70b-chat
self.model = "llama-2-70b-chat"

You can even create a cli tool with it:

from Perplexity_Selenium import Perplexity

perplexity = Perplexity()

while True:
    inp = str(input("> "))
    c = perplexity.search(inp)
    if c:
        print(c)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages