Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model usage time #599

Merged
merged 6 commits into from
Feb 7, 2025
Merged

Model usage time #599

merged 6 commits into from
Feb 7, 2025

Conversation

swuecho
Copy link
Owner

@swuecho swuecho commented Feb 7, 2025

No description provided.

- Added `GetLatestUsageTimeOfModel` SQL query to fetch latest usage time and message count for models within a specified interval.
- Updated `ListSystemChatModels` handler to include last usage time and message count in the response.
- Introduced `ChatModelWithUsage` struct to merge chat model data with usage statistics.
- Align struct fields in `chat_main_service.go` for better readability.
- Optimize `ListSystemChatModels` in `chat_model_handler.go` using `lo.Map` for pre-allocated slice and cleaner code.
- Add missing newline in `openai.go` for consistent formatting.
…ctor

- Added `date-fns` v2.30.0 to handle date formatting.
- Updated `@babel/runtime` to v7.26.7.
- Implemented `formatTimestamp` utility in `ModelSelector.vue` to display relative time for model last usage.
@swuecho swuecho merged commit 0abd83d into master Feb 7, 2025
2 checks passed
@ossy45
Copy link

ossy45 commented Feb 9, 2025

I can fix it

@swuecho
Copy link
Owner Author

swuecho commented Feb 10, 2025

I can fix it

Thanks. already fixed. You can pick any other issue if you have time.

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