Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philfung/perplexed
Open-source Perplexity-like RAG app.
https://github.com/philfung/perplexed
ai-search-engine groq llm perplexity perplexity-ai search-engine websearch websearch-agent
Last synced: about 4 hours ago
JSON representation
Open-source Perplexity-like RAG app.
- Host: GitHub
- URL: https://github.com/philfung/perplexed
- Owner: philfung
- Created: 2024-05-08T02:41:06.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-14T19:06:52.000Z (2 months ago)
- Last Synced: 2025-02-13T02:14:35.726Z (7 days ago)
- Topics: ai-search-engine, groq, llm, perplexity, perplexity-ai, search-engine, websearch, websearch-agent
- Language: JavaScript
- Homepage: https://philfung.github.io/perplexed
- Size: 1.03 MB
- Stars: 104
- Watchers: 1
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- StarryDivineSky - philfung/perplexed
README
##
Perplexed
#### Open-source app inspired by the amazing web search product, Perplexity.[**Live Demo**](https://d37ozmhmvu2kcg.cloudfront.net/)
![]()
## 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
### A. Python Server
1. ```
cd backend
copy config.json.sample config.json
```
3. In [`config.json`](https://github.com/philfung/perplexed/blob/main/backend/config.json.example), fill in `GOOGLE_SEARCH_API_KEY` and `GOOGLE_SEARCH_ENGINE_ID` credentials from [Google Custom Search API](https://developers.google.com/custom-search/v1/overview).
4. Fill in `GROQ_API_KEY` credentials from [Groq](https://console.groq.com/docs/quickstart).
5. Setup virtual environment, packages, and deploy the server
```
virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
python app.py
```
This is fine for dev testing.In production, in addition, you probably want to use gunicorn ([1](https://github.com/philfung/perplexed/blob/main/backend/gunicorn_config.py), [2](https://github.com/philfung/perplexed/blob/main/backend/script_start_gunicorn.sh)) and nginx ([1](https://github.com/philfung/perplexed/blob/main/backend/nginx.conf)) in conjunction with your python server ([1](https://github.com/philfung/perplexed/blob/main/backend/script_kill_servers.sh)) (utility scripts linked).
### B. React Frontend
1. ```
cd frontend
```
2. Update `API_URL` in [`constants.js`](https://github.com/philfung/perplexed/blob/main/frontend/src/constants.js) to point to your server
3. ```
npm install
npm run build
```
3. In dev testing, to start the server:
```
npm run start
```
In production, to start the server:
```
npm 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
```