The Prompt Enhancer is a Chrome extension designed to improve the quality of text prompts for Large Language Models (LLMs) using the Groq AI API. It adds an "Enhance Prompt" button next to text areas on web pages. When clicked, the extension sends the text from the textarea to the Groq API, which uses a prompt engineering expert model to refine and enhance the text. The enhanced prompt is then automatically inserted back into the textarea, ready for use in your favorite chat-based LLM platforms.
- Prompt Enhancement: Utilizes the powerful Groq AI API to restructure and refine user-provided text into more effective prompts for LLMs.
- Seamless Integration: Adds an "Enhance Prompt" button next to all textarea elements on any webpage, providing easy access to prompt enhancement wherever you need it.
- API Key Storage: Securely stores your Groq API key locally within the browser for persistent use.
- User-Friendly: Simple popup interface to set and save your Groq API key.
- Real-time Feedback: Provides "Enhancing..." status while processing and displays alerts for API key issues or errors.
-
The popup presents a compact Groq API Key screen with a title, a single key field, and clear primary actions for saving the key.
-
The popup loads any previously saved key on open and provides a brief saved status message after storing changes.
- Download the repository: You can download this repository as a ZIP file and extract it to your local machine.
- Open Chrome Extensions page: In your Chrome browser, navigate to
chrome://extensions/. - Enable Developer mode: Toggle the "Developer mode" switch in the top right corner of the Extensions page to the "ON" position.
- Load unpacked: Click the "Load unpacked" button in the top left corner.
- Select extension directory: Browse to the extracted folder of the "Prompt Enhancer" extension and select the folder.
- Extension installed: The "Prompt Enhancer" extension should now be installed and visible on your Chrome Extensions page.
-
Set your Groq API Key:
- Click on the "Prompt Enhancer" extension icon in your Chrome toolbar. This will open the extension popup.
- Enter your Groq API key into the provided input field.
- Click the "Save API Key" button. The extension will store your API key securely.
-
Enhance Prompts on any webpage:
- Navigate to any website with a textarea where you would like to write a prompt (e.g., chat applications, forums, text editors).
- You will notice an "Enhance Prompt" button added next to each textarea.
- Write your initial prompt in the textarea.
- Click the "Enhance Prompt" button.
- The button text will change to "Enhancing..." while the extension processes your prompt.
- Once enhanced, the textarea content will be replaced with the improved prompt generated by Groq AI.
- You can now use this enhanced prompt as needed.
Important Notes:
- Groq API Key Required: This extension requires a valid Groq API key to function. You need to obtain an API key from the Groq platform (https://console.groq.com/) and enter it in the extension popup.
- API Usage: Using this extension will consume your Groq API credits based on the number of tokens processed during prompt enhancement. Please refer to Groq's pricing for details.
- Error Handling: If the API key is not set or if there are issues communicating with the Groq API, the extension will display an alert message.
Contributions to improve the Prompt Enhancer are welcome! Please feel free to fork this repository, make your changes, and submit a pull request.