Skip to content

Yukimura66/simple-llm-corrector

Repository files navigation

Simple LLM Corrector (Chrome Extension)

A minimal TypeScript and React Chrome extension to correct selected text in inputs/textareas using a configurable LLM from OpenAI-compatible or Anthropic providers.

Features

  • Corrects selected text in any editable input field or textarea.
  • Supports both OpenAI-compatible APIs and Anthropic (Claude) models.
  • Configurable API provider, endpoint (for OpenAI), model name, and API key.
  • Activates via a keyboard shortcut (Alt+Shift+K by default) or context menu.
  • Simple, no-frills UI built with React.

Build & Load

  1. Install Dependencies: Requires Node.js.
npm install
  1. Build the Extension:
npm run build
  1. Load into Chrome:
    • Navigate to chrome://extensions.
    • Enable "Developer mode" in the top-right corner.
    • Click "Load unpacked" and select the dist folder from this project.

How to Use

1. Configure the API

  • After installing, open the extension's options page. You can usually find this by clicking the extension's icon in the Chrome toolbar and selecting "Options", or by clicking "Details" on the chrome://extensions page and finding the options link.
  • Select your API Provider: Choose between "OpenAI-compatible" or "Anthropic (Claude)".
  • Enter API Details:
    • For OpenAI-compatible, provide your API Base URL and the specific Model name you want to use.
    • For Anthropic, you only need to provide the Model name (e.g., claude-3-haiku-20240307). The API base URL is fixed.
  • Enter your API Key.
  • Click Save. You can use the "Test API Connection" button to verify your settings.

2. Correct Text

  • Click into any editable text area on a webpage (like a textarea or input field).
  • Select the text you want to correct.
  • Either:
    • Press the keyboard shortcut Alt+Shift+K.
    • Right-click on the selection and choose "Correct with LLM" from the context menu.

The selected text will be replaced with the corrected version from the LLM.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors