{% extends "base.html" %} {% block title %}Settings - AISBF Dashboard{% endblock %} {% block content %}

Server Settings

{% if success %}
{{ success }}
{% endif %} {% if error %}
{{ error }}
{% endif %}

Server Configuration

If specified, Let's Encrypt will be used to generate valid SSL certificates. Leave empty to use self-signed certificates.
Path to SSL certificate file. Leave empty to use default (~/.aisbf/cert.pem). Auto-generated using Let's Encrypt if public domain is set, otherwise self-signed.
Path to SSL private key file. Leave empty to use default (~/.aisbf/key.pem). Auto-generated with certificate.

Authentication

MCP Server

Model Context Protocol server for remote agent configuration
Tokens that give access to autoselection and autorotation settings + standard APIs
Tokens that give access to full system configuration + standard APIs

Dashboard

Internal Models

Used when condensation model is set to "internal"
Used when autoselect selection_model is set to "internal"
Model used for NSFW content detection
Model used for privacy-sensitive information detection
Model used for semantic embedding and vectorization

Database Configuration

Choose the database backend (SQLite is recommended for most users)
Path to SQLite database file (supports ~ expansion)
MySQL server hostname or IP address
MySQL server port (default: 3306)
MySQL database username
MySQL database password
MySQL database name

Cache Configuration

Choose the cache backend for model embeddings and other cached data (SQLite recommended for most users)
Path to SQLite cache database file (supports ~ expansion)
MySQL server hostname or IP address
MySQL server port (default: 3306)
MySQL database username
MySQL database password
MySQL database name for cache
Redis server hostname or IP address
Redis server port (default: 6379)
Redis database number (default: 0)
Redis password (optional)
Prefix for Redis keys (default: aisbf:)

Response Cache Configuration

Cache API responses to improve performance and reduce costs
Choose the backend for response caching
Time to live for cached responses (default: 600 seconds)
Maximum number of items in memory cache (default: 1000)

Response Cache Statistics

Status: Loading...

Content Classification

Enable automatic NSFW content detection for model selection
Enable automatic privacy-sensitive content detection for model selection
Enable semantic content classification using the configured model

TOR Hidden Service

Status: Loading...
Expose AISBF over TOR network as a hidden service

⚙️ Required torrc Configuration

Before enabling Tor, you must configure your torrc file (usually /etc/tor/torrc):

Step 1: Generate Password Hash
tor --hash-password "your_secure_password"
Step 2: Add to torrc
Step 3: Restart Tor
sudo systemctl restart tor  # Linux
brew services restart tor   # macOS
TOR control port host (default: 127.0.0.1)
TOR control port (default: 9051) - must match ControlPort in torrc
The password you used with tor --hash-password (NOT the hash itself)
Ephemeral: Leave blank for temporary service (new address each restart)
Persistent: Enter full absolute path (e.g., /home/username/.aisbf/tor_hidden_service) - must match HiddenServiceDir in torrc
⚠️ Note: torrc does NOT expand ~ - use full paths like /home/username instead
Port exposed on the onion address (default: 80) - must match HiddenServicePort in torrc for persistent services
TOR SOCKS proxy host (default: 127.0.0.1)
TOR SOCKS proxy port (default: 9050)

User Signup

Allow users to create accounts via signup form
Users must verify their email before they can login
How long verification links remain valid (1-168 hours)

OAuth2 Authentication

Google OAuth2

GitHub OAuth2

SMTP Email Configuration

Enable email sending functionality for password resets, account verification, and notifications
SMTP server hostname (e.g., smtp.gmail.com)
SMTP server port (587 for TLS, 465 for SSL, 25 for no encryption)
SMTP authentication username (leave blank if not required)
SMTP authentication password
Use STARTTLS for secure connection (recommended for port 587)
Use SSL/TLS from the start (for port 465)
Email address to send from
Display name for sent emails

Request Batching

Batch multiple requests together for improved efficiency
Time window to collect requests for batching (default: 100ms)
Maximum number of requests per batch (default: 8)

Provider-Specific Batching Settings

Adaptive Rate Limiting

Automatically adjust rate limits based on provider responses
Starting rate limit (0 = unlimited)
How quickly to adapt to rate limit changes (0-1, default: 0.1)
Safety margin below detected limit (default: 10%)
Rate at which limits recover after errors (default: 0.05)
Maximum allowed rate limit (default: 60)
Minimum allowed rate limit (default: 0.1)
Exponential backoff multiplier (default: 2)
Random jitter to prevent thundering herd (0-1, default: 0.25)
Time window for tracking rate limit history (default: 3600)
Number of successful requests before increasing rate limit (default: 10)

Admin Password

Enter a new password to change the admin dashboard password
Re-enter the new password to confirm
Cancel
{% endblock %}