AI Setup & Configuration
Get AI-powered log analysis working in minutes. This guide covers everything from basic API key setup to advanced configuration options for all supported AI providers.
Choose Your Setup Path
Select the approach that best fits your needs:
Best for: Privacy, unlimited usage, no API costs
Requirements:
8GB+ RAM (16GB+ recommended)
Local compute resources
Ollama installation
Setup time: 10-15 minutes
Best for: Development, testing, easy local setup
Requirements:
8GB+ RAM
LM Studio application
Downloaded model
Setup time: 5-10 minutes
Best for: Production use, reliability, best AI quality
Requirements:
OpenAI API account
Valid API key with credits
Internet connection
Setup time: 2-3 minutes
Best for: Enterprise, existing AI infrastructure
Requirements:
OpenAI-compatible API endpoint
Authentication credentials
Network access to API
Setup time: 5-15 minutes
OpenAI Setup
Step 1: Get Your API Key
Visit OpenAI API Platform
Create account or sign in
Navigate to API Keys (https://platform.openai.com/api-keys)
Create new secret key
Copy the key (starts with
sk-)
Step 2: Configure Environment
Method 1: Environment Variable (Recommended)
Method 2: Session Variable
Method 3: Configuration File
Step 3: Test Your Setup
Step 4: Verify AI Features Work
Local AI Setup (Ollama)
Step 1: Install Ollama
Step 2: Start Ollama Service
Step 3: Download AI Models
Model Recommendations by System:
8GB
mistral
4.1GB
Good for basic analysis
16GB
llama3
4.7GB
Excellent for most use cases
32GB+
llama3:70b
40GB
Best quality, production-ready
Step 4: Configure Gonzo for Ollama
Step 5: Test Ollama Integration
Local LM Studio Setup
Step 1: Install LM Studio
Download LM Studio from https://lmstudio.ai/
Install the application for your operating system
Launch LM Studio
Step 2: Download Models
Open LM Studio
Go to "Discover" tab
Search and download recommended models:
microsoft/DialoGPT-medium(lightweight, good for testing)meta-llama/Llama-2-7b-chat-hf(balanced performance)meta-llama/Llama-2-13b-chat-hf(better quality, needs more RAM)
Step 3: Start Model Server
Go to "Local Server" tab in LM Studio
Select your downloaded model
Click "Start Server"
Note the server URL (usually
http://localhost:1234)
Step 4: Configure Gonzo for LM Studio
Step 5: Test LM Studio Integration
Custom API Setup
Enterprise AI Services
Azure OpenAI Service:
AWS Bedrock (via compatible proxy):
Custom OpenAI-Compatible API:
Testing Custom APIs
Real-World Examples
See AI features in action:
AI and a TUI: Practical Logging Tools for SREs - Practical AI use cases for incident response
Advanced Configuration
Configuration File Setup
Create a comprehensive configuration file for persistent settings:
Environment-Specific Configurations
Development Environment:
Production Environment:
Usage:
Multi-Provider Setup
Switching Between Providers
Script for Easy Provider Switching:
Provider-Specific Aliases
Troubleshooting Setup Issues
OpenAI Issues
"Invalid API Key" Error:
"Rate limit exceeded" Error:
"Insufficient credits" Error:
Ollama Issues
"Connection refused" Error:
"Model not found" Error:
High Memory Usage:
LM Studio Issues
"No models available" Error:
"Model loading failed" Error:
Network and Firewall Issues
Corporate Firewall:
SSL Certificate Issues:
What's Next?
Now that you have AI configured, explore these guides:
AI Providers Guide - Detailed setup for specific providers
Using AI Features - Master AI-powered workflows and analysis
Log Analysis - Combine AI with algorithmic analysis
Or start using AI features immediately:
Your AI-powered log analysis is ready! 🤖 You can now get intelligent insights, natural language explanations, and automated pattern recognition for any log analysis task.
Last updated