Changes: 1. Hide "📊 Usage" button from regular users - only admins can see statistics 2. Updated .env.example with detailed pricing documentation 3. Clarified that OpenAI API does NOT return costs, only token counts 4. Cost is calculated locally: (tokens / 1000) × price_per_1k Cost Calculation: - OpenAI API returns only usage.input_tokens and usage.output_tokens - We calculate cost based on PROMPT_TOKEN_COST and COMPLETION_TOKEN_COST from .env - Current values are placeholders - need to update with real prices from OpenAI pricing page - Formula: cost = (prompt_tokens / 1000) × PROMPT_TOKEN_COST + (completion_tokens / 1000) × COMPLETION_TOKEN_COST Admin-only features: - 📊 Usage (token statistics) - 👨💼 Admin (user management & analytics) Regular users only see: - 💬 Chat Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .env.example | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||