Advanced LLM prompt testing tool supporting both Ollama and vLLM with modern UI and comprehensive features.
- Ollama Integration - Full support for Ollama API (local and cloud)
- vLLM Integration - Native vLLM OpenAI-compatible API support
- Easy Provider Switching - Toggle between providers with a single click
- Provider-Specific Configuration - Separate settings for each provider
- Configurable Server URLs - Connect to any Ollama or vLLM instance
- Settings Persistence - All preferences saved to localStorage
- Connection Testing - Test connection before usage
- Auto-save Settings - Automatic configuration backup
- Large Text Support - Perfect for agent prompts and long texts
- Character Counter - Real-time character count with warning indicators
- Example Prompts - Right-click for quick prompt templates
- Keyboard Shortcuts - Ctrl+Enter to send, ESC to close modals
- Live Response Streaming - See responses as they generate
- Typing Animation - Smooth cursor animation during generation
- Stop Generation - Cancel ongoing requests
- Progress Indicators - Real-time status updates
- Response Time Tracking - Precise timing in milliseconds
- Token Generation Speed - Tokens per second calculation
- Token Counting - Accurate token count display
- Performance Stats - Comprehensive generation metrics
- Responsive Design - Works on desktop and mobile
- Dark/Light Themes - Gradient backgrounds and modern styling
- Toast Notifications - User-friendly feedback system
- Modal Settings - Clean settings interface
- Copy/Export - Easy response copying and sharing
- Ollama installed and running
- Modern web browser
- Node.js (for development)
# Clone or download the project
cd lmm-prompt-tester
# Install dependencies
npm install
# Start development server
npm run dev# Build for production
npm run build
# Serve production build
npm run serve- Default:
http://localhost:11434 - Click the settings (βοΈ) button to configure
- Test connection with the π button
- Models are automatically loaded from your Ollama instance
- Choose from available models in the dropdown
- File sizes are displayed for reference
- Large textarea supports multi-line prompts
- Character counter shows prompt length
- Right-click for example prompts
- Click "μ μ‘ π€" or use Ctrl+Enter
- Watch real-time streaming responses
- Monitor performance metrics
- Copy responses with one click
- Clear responses when needed
- Export or save for later use
| Setting | Description | Default | Range |
|---|---|---|---|
| Server URL | Ollama server endpoint | http://localhost:11434 |
Any valid URL |
| Bearer Token | API authentication token | `` (empty) | Any valid token |
| Temperature | Response creativity | 0.7 |
0-2.0 |
| Max Tokens | Maximum response length | 32,768 |
100-131,072 |
| Auto-save | Automatic settings persistence | true |
true/false |
To use Ollama Cloud instead of local installation:
- Get API Key: Create an API key at ollama.com
- Run Development Server:
npm run dev(required to avoid CORS issues) - Configure in App:
- Provider: Select Ollama
- Server URL:
https://ollama.com/api - Bearer Token: Paste your API key
- Test Connection: Click the π button to verify
Important Notes:
β οΈ Development mode required: Usenpm run devto enable the proxy server- The proxy automatically routes requests through
localhost:3000to avoid CORS errors - Direct file opening (
file://) won't work due to browser CORS restrictions
Example Configuration:
- Provider: Ollama
- Server URL:
https://ollama.com/api - Bearer Token:
your-api-key-here - Models: Access cloud models like
gpt-oss:120b,deepseek-v3.1:671b,kimi-k2:1t
Available Cloud Models:
cogito-2.1:671b- 671B parameter modelkimi-k2:1t- 1T parameter modeldeepseek-v3.1:671b- DeepSeek V3.1mistral-large-3:675b- Mistral Large 3gpt-oss:120b- GPT-OSS 120Bqwen3-coder:480b- Qwen 3 Coder
To use vLLM (local deployment):
-
Start vLLM Server: Launch your vLLM instance with a model
# Example: Run vLLM with Llama-2-7b python -m vllm.entrypoints.openai.api_server \ --model meta-llama/Llama-2-7b-hf \ --host 0.0.0.0 \ --port 8000 -
Configure in App:
- Provider: Select vLLM
- Server URL:
http://localhost:8000(or your vLLM server address) - Model Name: Enter the exact model name (e.g.,
meta-llama/Llama-2-7b-hf)
-
Test Connection: Click the π button to verify
Key Differences from Ollama:
- Single Model: vLLM runs one model per server instance
- No Model List: Enter model name manually (no dropdown)
- No Authentication: Local vLLM doesn't require bearer tokens
- OpenAI API: Uses OpenAI-compatible
/v1/completionsendpoint
Example Configuration:
- Provider: vLLM
- Server URL:
http://localhost:8000 - Model Name:
meta-llama/Llama-2-7b-hf - Temperature:
0.7 - Max Tokens:
2048-32768
Supported Models: Any model supported by vLLM, including:
- Meta Llama series (
meta-llama/Llama-2-*,meta-llama/Llama-3-*) - Mistral models (
mistralai/Mistral-7B-*) - Yi models (
01-ai/Yi-*) - DeepSeek models (
deepseek-ai/deepseek-*) - And many more from HuggingFace
Perfect for high-context models like:
- gpt-oss:20b - 20B parameter model with large context
- deepseek-coder:33b - Code-focused large model
- yi:34b - Large multilingual model
- mixtral:8x22b - Mixture of experts model
Recommended Token Limits by Model:
- Small models (7B-13B): 4K-8K tokens
- Medium models (20B-34B): 16K-32K tokens
- Large models (70B+): 32K-128K tokens
| Shortcut | Action |
|---|---|
Ctrl + Enter |
Send prompt |
ESC |
Close modal |
Right-click |
Show example prompts |
The tool integrates with Ollama's REST API:
- GET
/api/tags- List available models - POST
/api/generate- Generate streaming responses
{
"model": "llama3.2",
"prompt": "Your prompt here",
"temperature": 0.7,
"stream": true,
"options": {
"num_predict": 2048
}
}- Vite - Modern build tool
- Vanilla JavaScript - No framework dependencies
- CSS Grid/Flexbox - Responsive layouts
- Local Storage - Settings persistence
- Fetch API - HTTP requests
- Streaming - Real-time response handling
lmm-prompt-tester/
βββ index.html # Main HTML structure
βββ main.js # Core application logic
βββ styles.css # Complete styling
βββ package.json # Dependencies and scripts
βββ vite.config.js # Build configuration
βββ README.md # This file
ConfigManager- Settings and persistenceAdvancedOllamaPromptTester- Main application- Context menu system for examples
- Toast notification system
- Extend the
AdvancedOllamaPromptTesterclass - Add new UI elements to
index.html - Style with CSS in
styles.css - Update configuration in
ConfigManager
Add new examples to the examplePrompts object:
const examplePrompts = {
"Custom Prompt": "Your prompt text here...",
// Add more...
};npm run build
# Deploy dist/ folder to any static hostFROM nginx:alpine
COPY dist/ /usr/share/nginx/html/
EXPOSE 80- Fork the repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
MIT License - See LICENSE file for details
- Ensure Ollama is running:
ollama serve - Check firewall settings
- Verify server URL in settings
- Install models:
ollama pull llama3.2 - Check available models:
ollama list - Restart Ollama service
- Reduce max tokens
- Lower temperature
- Use smaller models
For issues and questions:
- Check troubleshooting section
- Review Ollama documentation
- Open GitHub issue
Made with β€οΈ for the AI community