Unlisted
Like
Prompt_Improver
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v249View latest version
- 1 Million runs per day (vs 100k on free tier)
- 10 min wall clock time per run (vs 1 min on free)
- 1 minute interval cron vals (vs 15 min on free)
- Perfect for processing complex prompts with GPT-4o
- Unlimited private vals (vs 5 on free tier)
- 10 days log retention (vs 3 days on free)
- Essential for storing user history and analytics
- 10 custom domains (vs 0 on free)
- Deploy at:
promptimprover.yourdomain.com - Professional branding for enterprise clients
- Organize multiple files and folders
- Better code structure and maintenance
- Version control integration
- Team collaboration features
- Faster but less capable
- ~$0.15 per 1M input tokens
- Good for simple tasks
- Latest and most capable model
- 128K context window
- Superior reasoning and creativity
- Better at following complex instructions
- ~$5.00 per 1M input tokens
- Worth it for quality improvements
// Adaptive model selection based on complexity
const model = prompt.length > 100 ? 'gpt-4o' : 'gpt-4o-mini';
{ "improved": "Enhanced prompt text...", "originalLength": 50, "finalLength": 250, "stepsApplied": 3, "workers": ["Clarifier", "Condenser", "Includer"] }
<?xml version="1.0" encoding="UTF-8"?> <prompt> <improved><![CDATA[Enhanced prompt text...]]></improved> <metadata> <steps>3</steps> <workers>Clarifier, Condenser, Includer</workers> </metadata> </prompt>
# Improved Prompt
Enhanced prompt text with detailed specifications...
---
**Processing Steps:** 3
**Workers Used:** Clarifier, Condenser, Includer
improved: | Enhanced prompt text with multiple lines of content metadata: steps: 3 workers: [Clarifier, Condenser, Includer]
- β Only 100k runs/day (can hit limit with ~100 users)
- β 1 minute timeout (GPT-4o calls may timeout)
- β Only 5 private vals (limits functionality)
- β No custom domains (unprofessional)
- β 10x more runs (1M/day)
- β 10x longer timeouts (10 min)
- β Unlimited private vals
- β Custom domain branding
- β Projects for better organization
- β Only $10/month (less than 1 hour of dev time)
// Leverage Val Town's built-in caching
const cache = new Map();
const cacheTimeout = 15 * 60 * 1000; // 15 minutes
function getCached(key) {
const cached = cache.get(key);
if (cached && Date.now() - cached.time < cacheTimeout) {
return cached.value;
}
return null;
}
// Use Val Town's cron for batch processing
export default async function dailyAnalytics() {
// Runs daily at midnight with Pro's 1-min cron precision
await aggregateUsageStats();
await cleanupOldHistory();
await generateReports();
}
// Pro tier allows 1M requests/day = ~11 req/sec
const rateLimit = {
windowMs: 1000,
max: 10,
message: "Too many requests, please slow down"
};
- Team accounts for collaboration
- Slack Connect integration
- 5 million runs per day
- Unlimited custom domains
- SOC 2 compliance
- Log export capabilities
- Custom support SLAs
- Townie AI credits package
- No usage limits
- Daily Active Users: 500-1000
- Average Requests/User: 10-20
- Total Daily Requests: 5,000-20,000
- Well within Pro limits: β
- More than 50,000 daily requests
- Need team collaboration
- Require Slack integration
- Multiple domain deployments
- Private vals for API keys
- Secure environment variables
- Log retention for auditing
- Custom domain SSL certificates
- Isolated execution environment
- Upgrade to Pro: https://val.town/pricing
- Get 2 months free with annual billing
- Grandfather pricing - lock in $10/month forever
- Instant activation - no waiting period
- Cancel anytime - no lock-in
- Use Projects for better organization
- Set up custom domain immediately
- Implement caching to reduce API calls
- Use cron vals for scheduled tasks
- Monitor usage via Val Town dashboard
- Leverage 10-day logs for debugging
For a production Prompt Improver service:
- Reliability: 10x longer timeouts prevent failures
- Scale: Handle 10x more users
- Professional: Custom domain builds trust
- Privacy: Unlimited private vals for user data
- Support: Better debugging with extended logs
Bottom Line: At $10/month, Val Town Pro pays for itself with the first paying customer!