A better, simpler, and faster version of nathanrchn's PerplexityAI.
python -m pip install -U perplexityai
Join my Discord server for live chat, support, or if you have any issues with this package.
- β Star the project: Star this repository. It means a lot to me! π
- π Join my Discord Server: Chat with me and others. Join here:
import perplexityai
from asyncio import run
async def main():
while True:
prompt = input("π¦: ")
try:
resp = await perplexityai.Completion().create(prompt)
print(f"π€: {resp}")
except Exception as e:
print(f"π€: {e}")
run(main())