Deep-Research
My own implementation of DeepResearch.
Perplexity Fast Chat 🚀
A modern web interface to interact with Perplexity AI and OpenAI models, featuring a unique deep research mode.
Features • Preview • Installation • Usage • Technologies • Project Structure • Contribution
Table of Contents 📑
- Features
- Preview
- Installation
- Usage
- Technologies Used
- Project Structure
- Deep Research Mode
- Research Settings
- Contribution
- License
Features ✨
Models Support
- 🤖 Perplexity AI Models
- Sonar Reasoning Pro
- Sonar Reasoning
- Sonar Pro
- Sonar
- R1-1776
- 🧠 OpenAI Models for Deep Research
- o3-mini (high reasoning)
- o1-mini
- o1-preview
- o1
- 4o
Core Features
- 🔍 Exclusive Deep Research Mode
- Automatic breakdown of complex questions
- Multi-step in-depth research
- Final synthesis of results
- Configurable question count (auto or manual)
- Multiple research phases
- 💬 Modern Chat Interface
- Conversation history
- Markdown support
- Citations and references
- "Thinking" mode with animations
- 🎨 Sleek Design
- Responsive interface
- Dark mode
- Smooth animations
- Support for links and references
- ⚙️ Flexible API Key Management
- Configure API keys directly in the UI (stored in
localStorage) - Fallback to server-side environment variables if UI keys are not set
- Configure API keys directly in the UI (stored in
Preview 📸
Deep Research Mode
Settings Modal
Chat Interface
Installation 🛠️
Prerequisites
- Node.js (v16+)
- pnpm (v6+)
- Perplexity API key (Optional, can be set in UI)
- OpenAI API key (Optional, can be set in UI)
Setup Steps
-
Clone the repository
-
Install dependencies
-
Configure environment variables
Create a
.envfile at the project root:Note: These server-side keys are optional if you plan to configure them via the UI.
-
Start the development server
Your app should now be running at http://localhost:5173
Usage 🔮
- Select a model from the dropdown menu
- Choose a mode:
- Regular chat for quick answers
- Deep Research for complex questions
- Type your question or prompt
- For Deep Research mode, configure:
- OpenAI model for analysis
- Question count (auto or manual)
- (Optional) Configure API Keys: Click the "API Key Settings" button in the bottom-left navbar to enter your Perplexity and OpenAI keys. These will be saved in your browser.
Technologies Used 🧰
- SvelteKit - Web framework
- TailwindCSS - CSS framework
- Perplexity AI API - Chat API
- OpenAI API - API for Deep Research mode
- Marked - Markdown parsing
- Lucide Icons - Icon set
Project Structure 📁
/
├── src/
│ ├── routes/ # Application routes
│ │ ├── +page.svelte # Main page
│ │ └── api/ # API endpoints
│ │ ├── chat/ # Standard chat endpoint
│ │ ├── deep-research/ # Deep Research endpoint
│ │ └── name/ # Name generation endpoint
│ └── lib/ # Components and utilities
│ ├── components/ # Svelte components
│ │ └── common/ # Common small components
│ ├── helpers/ # Helper functions
│ ├── stores/ # Svelte stores
│ └── types/ # TypeScript types
├── images/ # Screenshots and images
├── .env # Environment variables
└── package.json # Dependencies and scripts
Deep Research Mode 🔬
The Deep Research mode is a unique feature that:
- Analyzes your question using OpenAI models (configurable)
- Breaks down into relevant sub-questions (auto or manual count)
- Researches each aspect using Perplexity AI
- Organizes research into multiple phases when needed
- Synthesizes the results into a comprehensive answer
- Provides detailed timing and progress information
Research Settings ⚙️
The Deep Research mode includes configurable settings:
| Setting | Options | Description |
|---|---|---|
| OpenAI Model | o3-mini, o1-mini, o1-preview, o1, 4o | Select model for question analysis |
| Question Count | Auto / Manual (3-40) | Control how many sub-questions are generated |
| Reasoning | High / Standard | Different reasoning approaches based on model |
Contribution 🤝
API Key Management
This application supports two ways to provide API keys:
- UI Configuration (Recommended for Local Use): Use the "API Key Settings" modal (accessible from the navbar) to enter your Perplexity and OpenAI keys. These are stored securely in your browser's
localStorageand sent with each request. - Server Environment Variables: Set
PERPLEXITY_API_KEYandOPENAI_API_KEYin a.envfile at the project root. This is suitable for deployed environments or if you prefer not to store keys in the browser.
The application prioritizes keys set in the UI. If UI keys are not found, it falls back to using the environment variables.
Contributions are welcome! Please follow these steps:
- Fork the project
- Create a branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature/improvement) - Open a Pull Request
Please ensure your code follows the project's coding style and include appropriate tests.
License 📄
This project is licensed under the MIT License - see the LICENSE file for details.
Pierre Roy