Chat with Perplexity AI in terminal
npm i playwright-chromium playwright-extra puppeteer-extra-plugin-stealth
npx playwright install chromium
perplexity.js
fetches result fromhttps://www.perplexity.ai/
:
$ ./perplexity.js "enter any text here"
perplexity-labs.js
fetches result fromhttps://labs.perplexity.ai/
:
$ ./perplexity-labs.js "enter any text here"
LLM sonar-medium-online
is selected by default. Set the second argument as model name to select another model, for example: ./perplexity-labs.js "text" "codellama-70b-instruct"
.
Check out copilot-cli
This script is designed to handle only one question and one answer at a time. The response is provided in plain text format, making it well-suited for quick answer in the terminal. It is not designed for a polished conversational experience, but rather for efficient command line usage with Perplexity AI.