ChatGPTBox Documentation

repository·master·Indexed 27 days ago

https://github.com/chatgptbox-dev/chatgptbox

A browser extension providing deep ChatGPT integrations across websites and search engines. Features include floating chat dialogs, page summarization, selection tools for translation and code explanation, and specialized adaptations for sites like GitHub, YouTube, and StackOverflow. Supports multiple AI providers including OpenAI, Claude, Azure, and custom LLM APIs via OpenAI-compatible formats (e.g., Ollama, OpenRouter, LiteLLM).

Tokens
13.8K
Snippets
6
Records
88
Agent score
94%

What's inside ChatGPTBox

  1. Key features and keyboard shortcuts of ChatGPTBox

    master

    ChatGPTBox offers several productivity features and keyboard shortcuts:

    • Call Chat Dialog Box: Invoke a chat dialog on any page using <kbd>Ctrl</kbd>+<kbd>B</kbd>.
    • Summarize Page: Summarize the current page via the right-click menu using <kbd>Alt</kbd>+<kbd>B</kbd>.
    • Independent Conversation Page: Open a dedicated conversation page using <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd>.
    • API Support: Supports multiple APIs including OpenAI (Free and Plus), GPT-3.5, GPT-4, Claude, New Bing, Moonshot, Self-hosted, and Azure.
    • Website Integrations: Deep integration with sites like Reddit, Quora, YouTube, GitHub, GitLab, StackOverflow, Zhihu, and Bilibili.
    • Selection Tools: Use the selection tool or right-click menu for tasks like translation, summarization, proofreading, sentiment analysis, paragraph splitting, code explanation, and querying.
    • Customization: Supports custom API addresses and allows enabling/disabling specific site adaptations and selection tools (bubbles).
  2. Explore ChatGPTBox features and shortcuts

    master

    ChatGPTBox provides several productivity features and keyboard shortcuts:

    • Floating Conversation Dialog: Call the chat box on any page using <kbd>Ctrl</kbd>+<kbd>B</kbd>.
    • Summarize Page: Summarize the current page using the right-click menu or <kbd>Alt</kbd>+<kbd>B</kbd>.
    • Independent Conversation Page: Open a dedicated conversation page using <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd>.

    Key Capabilities:

    • Multi-API Support: Works with Web API (Free/Plus), GPT-3.5, GPT-4, Claude, New Bing, Moonshot, Self-Hosted, Azure, and more.
    • Site Integrations: Specialized features for Reddit, Quora, YouTube, GitHub, GitLab, StackOverflow, Zhihu, and Bilibili.
    • Selection Tools: Right-click menu tools for translation, summarization, refinement, sentiment analysis, paragraph splitting, and code explanation.
    • Search Engine Integration: Integrates with major search engines and supports custom search requests.
    • Advanced Rendering: Supports code highlighting and complex mathematical formulas.
  3. Configure Custom Models in ChatGPTBox

    master

    ChatGPTBox supports a Custom Model mode, allowing you to use various LLM providers by converting them to the OpenAI format.

    Supported integration patterns include:

    • Using LiteLLM or One-API to convert LLM APIs into OpenAI format.
    • Using Ollama or OpenRouter via the Custom Model mode.
    • Providing a Custom API address in the settings.
  4. Install ChatGPTBox on various browsers and devices

    master

    ChatGPTBox is a browser extension that integrates deep ChatGPT capabilities into your browsing experience. You can install it on the following platforms:

    For a complete list of installation methods, visit the official Wiki.

  5. Use ChatGPTBox features and shortcuts

    master

    ChatGPTBox provides several keyboard shortcuts and interaction methods to enhance your browsing experience:

    • Call chat dialog box: Use <kbd>Ctrl</kbd>+<kbd>B</kbd> on any page at any time.
    • Summarize page: Use <kbd>Alt</kbd>+<kbd>B</kbd> via the right-click menu to summarize the current page.
    • Independent conversation page: Use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> to open a dedicated conversation interface.
    • Selection Tools: Highlight text and use the selection tool or right-click menu to perform tasks like translation, summarization, polishing, sentiment analysis, paragraph division, or code explanation.
    • Site Integrations: Specialized features are available for sites like Reddit, Quora, YouTube, GitHub, GitLab, StackOverflow, Zhihu, and Bilibili.
    • Search Engine Integration: Integrated with mainstream search engines and supports custom queries.
  6. ChatGPTBox Keybindings and Features

    master

    ChatGPTBox offers several keyboard shortcuts and built-in tools to enhance your browsing experience:

    Keyboard Shortcuts

    • Call Chat Dialog: Ctrl + B
    • Summarize Page (via Right-click menu): Alt + B
    • Independent Conversation Page: Ctrl + Shift + H

    Core Features

    • Multi-API Support: Supports Web API (for Free and Plus users), GPT-3.5, GPT-4, Claude, New Bing, Moonshot, Self-Hosted, Azure, and more.
    • Website Integrations: Deep integration for sites like Reddit, Quora, YouTube, GitHub, GitLab, StackOverflow, Zhihu, and Bilibili.
    • Selection Tools: Right-click menu options for Translation, Summarization, Polishing, Sentiment Analysis, Paragraph Splitting, and Code Explanation.
    • Search Engine Integration: Works with all popular search engines and supports custom query configurations.
    • Conversation Management: Supports multi-branch conversations with static floating card boxes and easy saving/copying of chat logs.
    • Customization: You can enable or disable specific site adaptations and selection tools (chat bubbles) in the settings.
  7. Initialize ChatGPTBox content script

    master

    The content script entrypoint initializes several core features of ChatGPTBox within the browser context, including:

    • Language Support: Sets the application language based on user preferences.
    • Access Token Management: Automatically attempts to overwrite or fetch ChatGPT access tokens from chatgpt.com to ensure seamless API usage.
    • Selection Tools: Enables floating toolbars that appear when text is selected via mouse or touch.
    • Right-Click Menu: Initializes handlers for context menu interactions.
    • Static Cards: Mounts site-specific UI components (e.g., for Google or Kagi) based on site adapters.
    • Jump Back Notifications: Handles URL parameters to show notifications when returning to a site.
    • Port Listeners: Registers listeners for communication between the extension background and the web page (specifically for chatgpt.com).
  8. Understand the Configuration Migration Logic

    master

    The configuration system uses a migration process to ensure compatibility between different versions of the schema. Key aspects of the migration include:

    • Provider Secret Migration: Moves secrets from legacy top-level fields (mapped via LEGACY_SECRET_KEY_TO_PROVIDER_ID) into a centralized providerSecrets object.
    • Custom Provider Normalization: Converts customOpenAIProviders into a standardized storage shape, handling ID renames and ensuring uniqueness.
    • API Mode Reconciliation: Migrates customApiModes and apiMode settings, promoting mode-level API keys to the providerSecrets store to maintain a single source of truth.
    • Backward Compatibility: Automatically reverse-syncs values from the new providerSecrets object back to legacy top-level fields to support older extension versions.
    • Schema Versioning: Updates configSchemaVersion to the current CONFIG_SCHEMA_VERSION during the migration process.