AI Integration
Overview
AI Text Editor integrates directly with LLM APIs to provide real-time writing assistance and feedback.
Configuration
API Key Setup
- Navigate to the Settings tab
- Select your preferred LLM provider
- Enter your API key
- Choose your model (if applicable)
Supported Providers
| Provider | Models | Features |
|---|---|---|
| Anthropic | Claude | Safety-focused |
| Gemini | Multimodal capabilities | |
| Groq | Llama, Mixtral, GPT OSS | Fast inference |
| OpenAI | GPT-x | High quality responses |
How It Works
Text Analysis Pipeline
- User Types: Text is entered in the editor
- Analysis: Trigger based prompts are sent to the LLMs
- Parallel Execution: Multiple prompts run simultaneously
- Progressive Updates: UI updates as each response arrives
- Feedback Display: HTML responses shown in sidebar
Prompt System
Built-in Analysis
- General text feedback
- Grammar and style suggestions
- Content improvement recommendations
Custom Prompts
Create personalized prompts with template variables:
Available variables:
- {text} - All text in the editor
- {sentence} - Current sentence
- {word} - Current word
- {paragraph} - Current paragraph
Response Format
AI responses are returned as HTML for flexible formatting. The HTML itself is provide by the LLM.
Best Practices
API Usage
- Monitor your API usage and costs
- Use appropriate models for your needs
- Consider rate limits when creating prompts
Prompt Design
- Be specific about what you want analyzed
- Use template variables for dynamic content
- Test prompts with different text types
- Put your instructions at the beginning to benefit from caching
Performance
- Disable unused prompts to reduce API calls
- Use shorter prompts for faster responses
Troubleshooting
Common Issues
No AI Feedback - Check API key configuration - Verify internet connection - Ensure AI feedback is enabled in settings
Slow Responses - Check your internet connection - Try a different LLM provider - Reduce the number of active prompts
Error Messages - Verify API key is valid and has credits - Check provider status pages - Review prompt formatting