Skip to content

abeginnDev/AhkGPTAssistent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Text Assistant (AHK v1 & v2)

An AutoHotkey tool for quick text correction, optimization, and generation using OpenAI GPT-4 (or compatible APIs).

Now updated with AutoHotkey v2 support! Choose the version that matches your installation.

✨ Features

Feature v1 (Legacy) v2 (Recommended)
Engine AutoHotkey v1.1 AutoHotkey v2.0+
Styles 3 Presets (Friendly, Tech, Chat) 3 Presets + Free Style
API Config OpenAI Only Custom URL & Model ID
Local LLM No Yes (Ollama/LM Studio support)
Async Gen Yes Yes (Optimized)

Core Functionality

  • Quick Replace: Replace selected text directly in any app (Ctrl+Alt+X)
  • Parallel Processing: Generate Friendly, Technical, and Conversational styles simultaneously.
  • Custom Prompts: Fully customizable instructions via GUI.
  • Multi-Monitor Support: Smart window positioning and monitor selection.
  • Clipboard History: Safely restores clipboard after text replacement.

📂 Folder Structure

This repository contains two versions of the script:

  • /v1/: For users running legacy AutoHotkey v1.1.
  • /v2/: For users running modern AutoHotkey v2.0 (Includes generic API support).

🚀 Installation

Option A: AutoHotkey v2 (New & Better)

  1. Install AutoHotkey v2: Download v2.0
  2. Navigate to the v2 folder in this repo.
  3. Run KI-Text-Assistent.ahk (Double-click).

Option B: AutoHotkey v1 (Legacy)

  1. Install AutoHotkey v1.1: Download v1.1
  2. Navigate to the v1 folder.
  3. Run KI-Text-Assistent.ahk.

🔑 Configuration & API Key

1. Get an API Key

You can use OpenAI or any local/compatible provider.

  1. OpenAI: Go to platform.openai.com -> Create new secret key.
  2. Local LLM: Start your server (e.g., LM Studio/Ollama) and get your local URL (usually http://localhost:1234/v1/chat/completions).

2. Setup in Script

  1. Right-click the tray icon 🤖 in your taskbar.
  2. Select "Options" (Einstellungen).
  3. Enter your details:

3. Enter your details:

Provider API Endpoint Suggested Model ID
OpenAI https://api.openai.com/v1/chat/completions gpt-4o, gpt-4o-mini
Google Gemini https://generativelanguage.googleapis.com/v1beta/openai/chat/completions gemini-1.5-flash, gemini-2.0-flash-exp
Ollama (Local) http://localhost:11434/v1/chat/completions llama3, mistral, phi3
LM Studio (Local) http://localhost:1234/v1/chat/completions (Selected in LM Studio)
Groq (Fast) https://api.groq.com/openai/v1/chat/completions llama3-70b-8192, mixtral-8x7b-32768
Mistral https://api.mistral.ai/v1/chat/completions mistral-large-latest

⚠️ Security: The key is stored locally in prompts.ini. Never share this file!

⌨️ Hotkeys

Hotkey Function
Ctrl+Alt+C Open GUI: Opens the main window with the selected text copied.
Ctrl+Alt+X Quick Replace: Opens a small menu to replace text instantly.

📖 Usage

GUI Mode (Ctrl+Alt+C)

Best for comparing different tones or writing custom instructions.

  1. Select text -> Press Hotkey.
  2. Wait for parallel generation.
  3. v2 Only: Use the "Individuell" field to type a custom instruction (e.g., "Translate to Spanish") and click "Generieren".
Main GUI Interface

Quick Replace (Ctrl+Alt+X)

Best for fast corrections while typing emails or tickets.

  1. Select text -> Press Hotkey.
  2. Select style from menu.
  3. Text is replaced automatically.
Quick Replace Menu

⚙️ Advanced Configuration (ini)

Settings are saved in prompts.ini next to the script.

v2 Example prompts.ini:

[Config]
APIUrl=[https://api.openai.com/v1/chat/completions](https://api.openai.com/v1/chat/completions)
Model=gpt-4o-mini
APIKey=sk-your-key-here
PreferredMonitor=1
RememberPosition=1

[Prompts]
Freundlich=Correct the text in a friendly way...
Technisch=Correct the text technically...
...

About

Chatgpt Ki Assistent for AutoHotKey

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published