这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

No description provided.

@timothycarambat timothycarambat merged commit 6d01970 into master Jun 8, 2023
@timothycarambat timothycarambat deleted the chroma-support branch June 8, 2023 04:31
jsmillan10 added a commit to Brace-Developers/anything-llm that referenced this pull request Sep 28, 2024
@kfsone kfsone mentioned this pull request Apr 26, 2025
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
Alminc91 pushed a commit to Alminc91/anything-llm-kufer that referenced this pull request Aug 25, 2025
…ge-error

Show quota error message in embed chat
pilpat added a commit to pilpat/llm_mai that referenced this pull request Oct 29, 2025
…ecision)

Fixed three critical bugs in the Usage tracking page that caused white screen and incorrect display:

1. Bug Mintplex-Labs#1: Hardcoded 2024 dates
   - Component initialized with hardcoded test dates from October 2024
   - Fixed: Dynamic date calculation using getCurrentMonthDates() for current month

2. Bug Mintplex-Labs#2: Type error - string vs number
   - Requesty API returns spend as STRING but code called .toFixed() directly
   - Browser error: "TypeError: y.toFixed is not a function"
   - Fixed: Added parseFloat() to convert string to number before formatting

3. Bug Mintplex-Labs#3: Insufficient decimal precision
   - Using .toFixed(2) rounded $0.0025324 to $0.00 (incorrect)
   - Fixed: Changed to .toFixed(5) to display $0.00253 (correct)

Files changed:
- frontend/src/pages/GeneralSettings/Usage/index.jsx (lines 16-28, 216)
- reports/user-usage-tracking-implementation.md (comprehensive bug fix documentation)

Tested with user krokodylek1981@gmail.com:
- API Requests: 5
- Spend: $0.00253 (displayed correctly with 5 decimal places)
- Date Range: Current month (October 2025)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
pilpat added a commit to pilpat/llm_mai that referenced this pull request Oct 31, 2025
Performance improvements:
1. Eliminate duplicate NBP API call
   - Previously: 2 calls to NBP API (period rates + today's rate)
   - Now: 1 call, extract today's rate from period data
   - Savings: 2-4 seconds per page load

2. Add timeout to Requesty API call
   - Previously: No timeout, could hang indefinitely
   - Now: 10-second timeout with AbortController
   - Benefit: Fails fast, better error handling

3. Expose rates array in NBP utility
   - Return full rates array for date-specific rate extraction
   - Enables optimization Mintplex-Labs#1

Changes:
- frontend/src/utils/nbp.js: Add rates array to return value
- frontend/src/pages/GeneralSettings/Usage/index.jsx: Remove duplicate call
- server/utils/RequestyManagementService/index.js: Add request timeout
- reports/user-usage-tracking-implementation.md: Document optimizations

Results:
- Load time: 10s → 3-5s (50-70% faster)
- External API calls: 3 → 2 (eliminated duplicate)
- Better reliability with timeout protection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants