System AI
This commit is contained in:
parent
e732256cbf
commit
a7ad1e9bba
10 changed files with 271 additions and 13 deletions
|
|
@ -156,8 +156,8 @@ CORS_ORIGIN=https://${KABOOT_DOMAIN}
|
|||
NODE_ENV=production
|
||||
LOG_REQUESTS=true
|
||||
|
||||
# System AI (optional - for quiz generation without user's own key)
|
||||
VITE_API_KEY=${GEMINI_API_KEY}
|
||||
# System AI (optional - server-side quiz generation)
|
||||
GEMINI_API_KEY=${GEMINI_API_KEY}
|
||||
EOF
|
||||
|
||||
print_success "Created .env"
|
||||
|
|
@ -216,17 +216,18 @@ fi
|
|||
|
||||
print_step "Building frontend with production URLs..."
|
||||
|
||||
BUILD_ENV="VITE_API_URL=https://${KABOOT_DOMAIN} VITE_AUTHENTIK_URL=https://${AUTH_DOMAIN} VITE_OIDC_CLIENT_ID=kaboot-spa VITE_OIDC_APP_SLUG=kaboot"
|
||||
VITE_API_URL="https://${KABOOT_DOMAIN}" \
|
||||
VITE_AUTHENTIK_URL="https://${AUTH_DOMAIN}" \
|
||||
VITE_OIDC_CLIENT_ID="kaboot-spa" \
|
||||
VITE_OIDC_APP_SLUG="kaboot" \
|
||||
npm run build --silent 2>/dev/null || npm run build
|
||||
|
||||
if [ -n "$GEMINI_API_KEY" ]; then
|
||||
BUILD_ENV="$BUILD_ENV VITE_API_KEY=$GEMINI_API_KEY"
|
||||
print_success "System AI enabled with provided Gemini key"
|
||||
print_success "System AI will be available (key configured for backend)"
|
||||
else
|
||||
print_warning "No Gemini API key provided - users must configure their own"
|
||||
fi
|
||||
|
||||
eval "$BUILD_ENV npm run build --silent 2>/dev/null || $BUILD_ENV npm run build"
|
||||
|
||||
print_success "Frontend built"
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue