Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Leetcode ChatbotNew to Visual Studio Code? Get it now.
Leetcode Chatbot

Leetcode Chatbot

kebinLin

|
129 installs
| (6) | Free
A chatbot assistant for solving LeetCode problems directly in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Coding Chatbot - VS Code Extension

VSCode Extension Demo

A Visual Studio Code extension that provides an AI-powered coding assistant to help with LeetCode problems and general programming questions. The extension integrates with multiple AI models including Deepseek Coder, OpenAI GPT-4, and custom models through Groq or Ollama.

Features

  • Multiple AI Model Support:

    • Deepseek Coder (6.7b)
    • Deepseek R1
    • OpenAI GPT-4
    • Custom LLM via Groq
    • Custom Ollama models
  • Dual Mode Operation:

    • LeetCode Help: Specialized assistance for LeetCode problems
    • General Coding: Help with any programming questions
  • Smart Context Awareness:

    • Automatically captures current file content
    • Provides context-aware suggestions
    • Maintains conversation history
  • User Interface:

    • Integrated chat panel
    • Code formatting support
    • Easy model switching
    • New chat creation
    • Conversation history management

Installation

  1. Install the Extension:

    • Install from VS Code Marketplace [link]
    • Or download the VSIX file and install manually
  2. Install Required Dependencies:

    pip install -r requirements.txt
    
  3. Configure AI Models (Optional):

    • For OpenAI GPT-4: Set your API key using the "Update OpenAI API Key" command
    • For Groq: Set your API key and model using the respective commands
    • For Ollama: Install Ollama locally and set up your preferred model

Usage

Starting the Extension

  1. Open VS Code
  2. Click the LeetCode Chatbot icon in the sidebar
  3. The chat panel will open, ready to assist

Available Commands

Access these commands through the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

  • LeetCode Chatbot: Analyze Code
  • LeetCode Chatbot: Update OpenAI API Key
  • LeetCode Chatbot: Update Groq API Key
  • LeetCode Chatbot: Set Custom Model
  • LeetCode Chatbot: Set Ollama Model

Features Guide

  1. Model Selection:

    • Choose your preferred AI model from the dropdown
    • Models include Deepseek Coder, OpenAI GPT-4, and custom options
  2. Mode Toggle:

    • Switch between "LeetCode Help" and "General Coding" modes
    • LeetCode mode provides problem-specific assistance
    • General mode offers broader programming help
  3. Chat Interface:

    • Type questions in the input box
    • View conversation history
    • Start new conversations with the "New Chat" button
    • Copy code snippets with one click

Configuration

API Keys

  1. OpenAI GPT-4:

    Command: LeetCode Chatbot: Update OpenAI API Key
    
  2. Groq Custom Model:

    Commands:
    - LeetCode Chatbot: Update Groq API Key
    - LeetCode Chatbot: Set Custom Model
    
  3. Ollama Custom Model:

    Command: LeetCode Chatbot: Set Ollama Model
    

Server Configuration

The extension runs a local Flask server on port 5000. Ensure this port is available or modify the port in the settings if needed.

Requirements

  • Visual Studio Code 1.84.0 or higher
  • Python 3.8 or higher
  • Flask 3.1.0
  • Flask-Cors 5.0.0
  • OpenAI 1.63.0 (for GPT-4 support)
  • Ollama (for local models)

Known Issues

Please report any issues on the GitHub repository.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Note: This extension is not affiliated with LeetCode. It's an independent tool designed to assist with programming tasks.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft