Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions EfficientAI-Docs/.github/workflows/main.yml

This file was deleted.

57 changes: 56 additions & 1 deletion EfficientAI-Docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,71 @@ pip install -e .
eai init-config
```

Edit `config.yml` with your database and Redis connection strings:
Edit `config.yml` with your settings:

```yaml
# EfficientAI Configuration File

# Application Settings
app:
name: "Voice AI Evaluation Platform"
version: "0.1.0"
debug: true # Set to false in production
secret_key: "your-secret-key-here-change-in-production"

# Server Settings
server:
host: "0.0.0.0"
port: 8000

# Database Configuration (Required)
database:
url: "postgresql://efficientai:password@localhost:5432/efficientai"

# Redis Configuration (Required)
redis:
url: "redis://localhost:6379/0"

# Celery Configuration
celery:
broker_url: "redis://localhost:6379/0"
result_backend: "redis://localhost:6379/0"

# File Storage
storage:
upload_dir: "./uploads"
max_file_size_mb: 500
allowed_audio_formats:
- "wav"
- "mp3"
- "flac"
- "m4a"

# S3 Configuration (Optional - for cloud audio storage)
s3:
enabled: false
bucket_name: "your-s3-bucket-name"
region: "us-east-1"
access_key_id: "your-access-key-id"
secret_access_key: "your-secret-access-key"
endpoint_url: null # For S3-compatible services (MinIO, DigitalOcean Spaces)
prefix: "audio/"

# CORS Settings
cors:
origins:
- "http://localhost:3000"
- "http://localhost:8000"

# API Settings
api:
prefix: "/api/v1"
key_header: "X-API-Key"
rate_limit_per_minute: 60
```

> **Important**: Make sure to change `secret_key` to a secure random value in production!

### Start the application and worker

**Option A: Start both together (Recommended)**
Expand Down
152 changes: 152 additions & 0 deletions EfficientAI-Docs/docs/getting-started/s3-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
id: s3-storage
title: S3 Storage
sidebar_position: 2
---

# S3 Cloud Storage

## Overview

EfficientAI can store audio files and recordings in Amazon S3 or any S3-compatible storage service (MinIO, DigitalOcean Spaces, etc.).

This is useful for:
- Storing large audio files in the cloud
- Scaling storage independently from your server
- Integrating with existing cloud infrastructure

---

## Configuration

### 1. Update config.yml

Add the S3 configuration section to your `config.yml`:

```yaml
s3:
enabled: true
bucket_name: "your-bucket-name"
region: "us-east-1"
access_key_id: "AKIAIOSFODNN7EXAMPLE"
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
endpoint_url: null # Optional: for S3-compatible services
prefix: "audio/" # Optional: folder prefix for files
```

### 2. Configuration Options

| Option | Required | Description |
|--------|----------|-------------|
| `enabled` | Yes | Set to `true` to enable S3 storage |
| `bucket_name` | Yes | Name of your S3 bucket |
| `region` | Yes | AWS region (e.g., `us-east-1`, `eu-west-1`) |
| `access_key_id` | Yes | AWS Access Key ID |
| `secret_access_key` | Yes | AWS Secret Access Key |
| `endpoint_url` | No | Custom endpoint for S3-compatible services |
| `prefix` | No | Folder prefix for uploaded files (default: `audio/`) |

---

## AWS Setup

### 1. Create an S3 Bucket

```bash
aws s3 mb s3://your-bucket-name --region us-east-1
```

### 2. Create an IAM User

Create a user with programmatic access and attach this policy:

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::your-bucket-name",
"arn:aws:s3:::your-bucket-name/*"
]
}
]
}
```

### 3. Get Credentials

After creating the IAM user, note the **Access Key ID** and **Secret Access Key**.

---

## S3-Compatible Services

### MinIO

```yaml
s3:
enabled: true
bucket_name: "efficientai"
region: "us-east-1"
access_key_id: "minioadmin"
secret_access_key: "minioadmin"
endpoint_url: "http://localhost:9000"
prefix: "audio/"
```

### DigitalOcean Spaces

```yaml
s3:
enabled: true
bucket_name: "your-space-name"
region: "nyc3"
access_key_id: "your-spaces-key"
secret_access_key: "your-spaces-secret"
endpoint_url: "https://nyc3.digitaloceanspaces.com"
prefix: "audio/"
```

### Cloudflare R2

```yaml
s3:
enabled: true
bucket_name: "your-bucket"
region: "auto"
access_key_id: "your-r2-access-key"
secret_access_key: "your-r2-secret-key"
endpoint_url: "https://<account-id>.r2.cloudflarestorage.com"
prefix: "audio/"
```

---

## Verifying Connection

After configuring S3, restart the application:

```bash
eai start-all --config config.yml
```

Upload a test file through the UI or API. Check your S3 bucket to confirm the file appears under the configured prefix.

---

## Troubleshooting

| Issue | Solution |
|-------|----------|
| `Access Denied` | Check IAM permissions and bucket policy |
| `NoSuchBucket` | Verify bucket name and region |
| `Connection refused` | Check endpoint_url for S3-compatible services |
| `Invalid credentials` | Verify access_key_id and secret_access_key |
8 changes: 8 additions & 0 deletions EfficientAI-Docs/docs/monitoring/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Monitoring",
"position": 4,
"link": {
"type": "generated-index",
"description": "Monitor your Voice AI in production with observability, alerting, and scheduled tests."
}
}
126 changes: 126 additions & 0 deletions EfficientAI-Docs/docs/monitoring/alerting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
id: alerting
title: Alerting
sidebar_position: 2
---

# Alerting

## What is Alerting?

**Alerting** lets you set up automated notifications when your Voice AI metrics cross certain thresholds.

Instead of manually checking dashboards, you can configure alerts to notify you via email or webhook (Slack, etc.) when something needs attention.

---

## Creating an Alert

An alert is defined by:

1. **Metric**: What are you measuring?
2. **Condition**: When should it trigger?
3. **Notification**: How should you be notified?

---

## Available Metrics

| Metric | Description |
|--------|-------------|
| **Number of Calls** | Total call count |
| **Call Duration** | Average or total call length |
| **Error Rate** | Percentage of failed calls |
| **Success Rate** | Percentage of successful calls |
| **Latency** | Response time |
| **Custom** | Your own defined metrics |

---

## Aggregation Types

How the metric is calculated over the time window:

| Aggregation | Description |
|-------------|-------------|
| **Sum** | Total value |
| **Average** | Mean value |
| **Count** | Number of occurrences |
| **Min** | Minimum value |
| **Max** | Maximum value |

---

## Operators

| Operator | Meaning |
|----------|---------|
| `>` | Greater than |
| `<` | Less than |
| `>=` | Greater than or equal |
| `<=` | Less than or equal |
| `=` | Equal to |
| `!=` | Not equal to |

---

## Example Alert

> "Alert me when the **average latency** is **greater than 500ms** in the last **60 minutes**"

Configuration:
- **Metric**: Latency
- **Aggregation**: Average
- **Operator**: >
- **Threshold**: 500
- **Time Window**: 60 minutes

---

## Notification Options

### Email
Add one or more email addresses to receive alert notifications.

### Webhooks
Send alerts to Slack, Discord, or any webhook-compatible service.

Example Slack webhook:
```
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXX
```

---

## Notification Frequency

Control how often you receive notifications:

| Frequency | Description |
|-----------|-------------|
| **Immediate** | Send as soon as triggered |
| **Hourly** | Batch notifications hourly |
| **Daily** | Daily digest |
| **Weekly** | Weekly summary |

---

## Alert Status

| Status | Description |
|--------|-------------|
| **Active** | Alert is monitoring and will trigger |
| **Paused** | Alert is temporarily disabled |
| **Disabled** | Alert is turned off |

---

## Alert History

When an alert is triggered, a history record is created with:
- Trigger timestamp
- Metric value at trigger
- Acknowledgement status
- Resolution notes

View alert history in the Alerts dashboard to track incidents over time.
Loading