nathanrchn/perplexityai
关于
A python api to use perplexity.ai
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文perplexityai
A python api to use perplexity.ai
Installation
You can install the package with pip and git:
pip install git+https://github.com/nathanrchn/perplexityai.git
Basic Usage
You can just import the Perplexity class and use it like this:
from perplexity import Perplexity
perplexity = Perplexity()
answer = perplexity.search("What is the meaning of life?")
for a in answer:
print(a)
perplexity.close()
Advanced Usage
With the new version, you can now sign in to your account and use the api to its full potential. For now the only provider supported is email, but more will be added in the future.
from perplexity import Perplexity
perplexity = Perplexity("[email protected]")
And then you will receive an email from Perplexity AI. Copy the link associated with the Sign in button in the middle of the email.
The program will create a new file: .perplexity_session for keeping the session cookies.
I you are logged in, you can now upload files to your account.
perplexity.upload("path/to/file")
or
perplexity.upload("https://example.com/file")
Labs
There are three classes to use the labs.perplexity.ai service.
探索相关项目
加载中…