ai-prompt-utils
v1.0.0
Published
Ready-made AI prompt helpers (summarize, translate, rephrase, explain) for OpenAI-compatible APIs.
Maintainers
Readme
README.md
ai-prompt-utils 🤖
Ready-made AI helpers for common tasks like summarizing, translating, rephrasing, and explaining text.
Works with any OpenAI-compatible API (OpenAI, DeepSeek via OpenRouter, etc.).
✨ Features
- 📄 Summarize text
- 🌍 Translate into any language
- 📝 Rephrase into simpler words
- 👶 Explain like you're 5
- ⚡ Works with any API that follows the OpenAI format
📥 Installation
npm install ai-prompt-utils
🚀 Usage
const { summarize, translate, rephrase, explain } = require("ai-prompt-utils");
const API_URL = "https://api.openai.com/v1/chat/completions";
const API_KEY = "your_api_key_here";
(async () => {
console.log(await summarize("The Earth revolves around the Sun.", API_URL, API_KEY));
console.log(await translate("Hello world", "es", API_URL, API_KEY));
console.log(await rephrase("The meeting was postponed.", API_URL, API_KEY));
console.log(await explain("Quantum physics is complex.", API_URL, API_KEY));
})();