diff --git a/docs/features/ai-services.md b/docs/features/ai-services.md index 801d7a1..c35dceb 100644 --- a/docs/features/ai-services.md +++ b/docs/features/ai-services.md @@ -93,6 +93,7 @@ As a learner, I want AI-powered features like generated stories, speech recognit ### Configuration Setup +#### Development (Local) Add the following to your local `appsettings.Development.json` file: ```json @@ -112,8 +113,31 @@ Add the following to your local `appsettings.Development.json` file: } ``` +#### Production (Woodpecker CI/CD) +For production deployment via Woodpecker: + +1. **Add secrets in Woodpecker UI:** + - Go to your repository settings in Woodpecker + - Add the following secrets: + - `MISTRAL_APIKEY` - Your Mistral API key + - `MISTRAL_BASEURL` - Base URL (default: `https://api.mistral.ai/v1/`) + - `MISTRAL_DEFAULTMODEL` - Default model (default: `mistral-medium`) + - `MISTRAL_TIMEOUTSECONDS` - Timeout in seconds (default: `30`) + - `MISTRAL_MAXRETRIES` - Max retry attempts (default: `3`) + - `MISTRAL_RATELIMITPERMINUTE` - Rate limit per minute (default: `10`) + - `MISTRAL_ENABLECACHING` - Enable caching (default: `true`) + - `MISTRAL_CACHETTLMINUTES` - Cache TTL in minutes (default: `60`) + - `MISTRAL_CIRCUITBREAKERFAILURETHRESHOLD` - Circuit breaker threshold (default: `5`) + - `MISTRAL_CIRCUITBREAKERRESETMINUTES` - Circuit breaker reset time (default: `1`) + +2. **Secrets are automatically injected** via `.woodpecker.yml` and passed to docker compose as environment variables + **Note**: Do NOT commit your API key to version control. Use environment variables in production or keep it in local development configuration files only. +### Woodpecker Deployment Files +- `.woodpecker.yml` - CI/CD pipeline with secrets injection +- `docker-compose.yml` - Docker Compose with environment variable placeholders + ### Data Flow #### Story Generation Flow