Pierre Roy

AyfriDeep-Research

My own implementation of DeepResearch.

Svelte 11 stars 1 forks updated 05/05/2026

Perplexity Fast Chat 🚀

Version License: MIT SvelteKit TailwindCSS

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 ✨

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

Preview 📸

Deep Research Mode

Deep Research Mode

Settings Modal

Settings Modal

Chat Interface

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

  1. Clone the repository

    git clone https://github.com/your-username/perplexity-fast-chat.git
    cd perplexity-fast-chat
    
  2. Install dependencies

    pnpm install
    
  3. Configure environment variables

    Create a .env file at the project root:

    PERPLEXITY_API_KEY=your_perplexity_api_key
    OPENAI_API_KEY=your_openai_api_key
    

    Note: These server-side keys are optional if you plan to configure them via the UI.

  4. Start the development server

    pnpm dev
    

    Your app should now be running at http://localhost:5173

Usage 🔮

  1. Select a model from the dropdown menu
  2. Choose a mode:
    • Regular chat for quick answers
    • Deep Research for complex questions
  3. Type your question or prompt
  4. For Deep Research mode, configure:
    • OpenAI model for analysis
    • Question count (auto or manual)
  5. (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 TailwindCSS TypeScript

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 🔬

Deep Research Mode

The Deep Research mode is a unique feature that:

  1. Analyzes your question using OpenAI models (configurable)
  2. Breaks down into relevant sub-questions (auto or manual count)
  3. Researches each aspect using Perplexity AI
  4. Organizes research into multiple phases when needed
  5. Synthesizes the results into a comprehensive answer
  6. 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:

  1. 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 localStorage and sent with each request.
  2. Server Environment Variables: Set PERPLEXITY_API_KEY and OPENAI_API_KEY in a .env file 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:

  1. Fork the project
  2. Create a branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature/improvement)
  5. 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.


Made with ❤️ for AI research enthusiasts