1.0.1 • Published 2 years ago

perplexityai v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

PerplexityAI

Perplexity AI is an answer engine that delivers accurate answers to complex questions using large language models. It is an unofficial implementation of the PerplexityAI site to be able to use easily and quickly

Installation

Install this project with npm

  npm install --save perplexityai

Demo

Example of an search

const PerplexityAI = require('perplexityai');

const main = async() => {
  const prompt = 'cuál es la última polemica de elon musk?';
  const response = await PerplexityAI.search(prompt);
  console.log('response', response);
}

main();

OUTPUTS

{
  concise: '',
  detailed: '',
  sources: [
    {
      name: '',
      url: ''
    },
    {
      name: '',
      url: ''
    },
    ....
  ]
}

Authors