Closed lowspace closed 3 months ago
The workflow in here is:
flowchart TD
A[Start] --> B[Extract data-message-id]
A --> C[Extract current model slug]
B --> D[Check if data-message-id is in storage]
C --> D
D -- No --> E[Combine data-message-id with current model slug and run token counter]
D -- Yes --> F[Check if the current model slug was used for token counting]
F -- No --> E
F -- Yes --> G[Read token counts from storage]
Note:
While engaging in new and long conversations, CPU consumption can rise to about 40%. How can this be optimized?
The naive plan here is to use storage to avoid further duplication computation.