perplexed
perplexed copied to clipboard
Open-source Perplexity app.
Perplexed
Open-source app inspired by the amazing web search product, Perplexity.
Implementation
Given a user query, the app conducts a web search,
downloads the top N resulting web pages, then analyzes those pages
with an LLM.
The LLM can be any smaller, consumer-grade with at least 5k context window (assuming each web page ~1k tokens)
Deployment Instructions
Python Server
-
cd backend copy config.json.sample config.json - In
config.json, fill inGOOGLE_SEARCH_API_KEYandGOOGLE_SEARCH_ENGINE_IDcredentials from Google Custom Search API. - Fill in
GROQ_API_KEYcredentials from Groq. - Setup virtual environment, packages, and deploy the server
In the future, only need to do:virtualenv venv . venv/bin/activate pip install -r requirements.txt python app.py. venv/bin/activate python app.py
React Frontend
-
cd frontend - Update
API_URLinconstants.jsto point to your server -
npm install - In dev, to start the server:
In production, to start the server:npm run startnpm i -g npm@latest rm -rf node_modules rm -rf package-lock.json npm cache clean --force npm i --no-optional --omit=optional npm run build npm install -g serve server -s build