{"id":25426757,"url":"https://github.com/sawadkk/localprompt","last_synced_at":"2026-04-19T15:04:36.854Z","repository":{"id":276764824,"uuid":"930171879","full_name":"sawadkk/LocalPrompt","owner":"sawadkk","description":"LocalPrompt is an AI-powered tool designed to refine and optimize AI prompts, helping users run locally hosted AI models like Mistral-7B for privacy and efficiency. Ideal for developers seeking to run LLMs locally without external APIs.","archived":false,"fork":false,"pushed_at":"2025-02-10T10:01:01.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T10:31:53.888Z","etag":null,"topics":["ai-development","ai-prompt","fastapi","llama-cpp","llm","local-ai","mistral7b","offline-ai","open-source-llm","self-hosted-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sawadkk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-10T07:39:10.000Z","updated_at":"2025-02-10T10:01:04.000Z","dependencies_parsed_at":"2025-02-10T10:32:37.909Z","dependency_job_id":"20a5dc97-1d79-4d3f-af48-a4380179924d","html_url":"https://github.com/sawadkk/LocalPrompt","commit_stats":null,"previous_names":["sawadkk/promptmate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawadkk%2FLocalPrompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawadkk%2FLocalPrompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawadkk%2FLocalPrompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawadkk%2FLocalPrompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sawadkk","download_url":"https://codeload.github.com/sawadkk/LocalPrompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239214043,"owners_count":19601075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-development","ai-prompt","fastapi","llama-cpp","llm","local-ai","mistral7b","offline-ai","open-source-llm","self-hosted-ai"],"created_at":"2025-02-17T00:21:47.704Z","updated_at":"2026-04-19T15:04:36.811Z","avatar_url":"https://github.com/sawadkk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 LocalPrompt - AI Prompt Engineer\n\nLocalPrompt is an AI-powered tool designed to **refine and optimize** AI prompts, helping users generate high-quality, structured prompts that work effectively with advanced AI models.  \n\nThis tool is built to work **locally** with **Mistral 7B**, ensuring privacy and efficiency without relying on external cloud services. It is ideal for **AI prompt engineers, machine learning developers, and researchers** who want to **run AI models offline**.\n\n## 🔍 Why Use Local AI Models?\n- 🔹 **Privacy \u0026 Security** - No external API calls, all processing happens on your own machine  \n- 🔹 **Cost-Effective** - Avoid expensive API costs by running AI models **completely offline**  \n- 🔹 **Customization** - Fine-tune the model and modify it for **specific use cases**  \n- 🔹 **Performance** - Run **low-latency** AI models optimized for your **local hardware (CPU/GPU)**  \n\n## 📌 Features\n- ✅ **Refines AI Prompts** - Converts rough ideas into **high-quality, structured prompts**  \n- ✅ **Uses Mistral 7B** - Locally hosted **Mistral-7B-Instruct** for privacy and efficiency  \n- ✅ **Customizable** - Supports different prompt **optimizations and fine-tuning**  \n- ✅ **FastAPI Backend** - Simple API with easy-to-use **REST endpoints**  \n\n## 📂 Folder Structure\n```\nLocalPrompt/\n│️—— app/\n│   ├—— api/                  # API Routes\n│   │   ├—— prompt.py         # Prompt Engineering API\n│   ├—— config/                 # Core Configurations\n│   │   ├—— settings.py         # Environment \u0026 Settings\n│   ├—— services/             # Business Logic\n│   │   ├—— prompt_service.py # Prompt Processing Logic\n│   └—— main.py               # FastAPI Entry Point\n│️—— models/                    # AI Model Storage (Ignored in .gitignore)\n│️—— .env                        # Environment Variables\n│️—— .gitignore                  # Git Ignore File\n│️—— requirements.txt            # Python Dependencies\n│️—— README.md                   # Project Documentation\n```\n\n## 🛠 Installation \u0026 Setup\n\n### **1️⃣ Clone the Repository**\n```bash\ngit clone https://github.com/sawadkk/LocalPrompt.git\ncd LocalPrompt\n```\n\n### **2️⃣ Create a Virtual Environment**\n```bash\npython -m venv venv\nsource venv/bin/activate  # On macOS/Linux\nvenv\\Scripts\\activate     # On Windows\n```\n\n### **3️⃣ Install Dependencies**\n```bash\npip install -r requirements.txt\n```\n\n### **4️⃣ Download Mistral 7B Model**\n```bash\nmkdir models\ncurl -L -o models/mistral-7b-instruct-v0.1.Q4_K_M.gguf https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF/resolve/main/mistral-7b-v0.1.Q4_K_M.gguf?download=true\n```\n\n### **5️⃣ Run the API**\n```bash\nuvicorn app.main:app --reload\n```\n\n## 🔥 Usage\n### **1️⃣ API Endpoint**\n- **URL:** `POST /api/generate_prompt/`\n- **Request:**\n```json\n{\n    \"idea\": \"Create a sci-fi world with AI robots.\",\n    \"max_tokens\": 100,\n    \"temperature\": 0.7,\n    \"top_k\": 40,\n    \"top_p\": 0.9\n}\n```\n- **Response:**\n```json\n{\n    \"original_idea\": \"Create a sci-fi world with AI robots.\",\n    \"refined_prompt\": \"Design a detailed sci-fi world featuring advanced AI-driven civilizations...\",\n    \"temperature\": 0.7,\n    \"top_k\": 40,\n    \"top_p\": 0.9\n}\n```\n\n## 📌 Future Enhancements\n- 🔹 **Fine-tuning** - Train Mistral 7B for more **precise prompt refinement**  \n- 🔹 **Web UI** - Add a **frontend interface** for prompt generation  \n- 🔹 **Multi-model Support** - Integrate with **OpenAI, LLaMA, DeepSeek** for comparisons  \n\n## ✨ Contributing\n1. Fork the repository  \n2. Create a new branch: `git checkout -b feature-name`  \n3. Commit changes: `git commit -m \"Added new feature\"`  \n4. Push to branch: `git push origin feature-name`  \n5. Open a **Pull Request** 🎉  \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawadkk%2Flocalprompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsawadkk%2Flocalprompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawadkk%2Flocalprompt/lists"}