Commit Graph

14 Commits

Author SHA1 Message Date
Andreas Köpf a272ec26c5 exclude banned users from leaderboard 2023-02-08 20:13:49 +01:00
Oliver Stanley 9c7ced59bb Update get user stats to include necessary fields (#1177) 2023-02-05 16:29:46 +01:00
Andreas Köpf af0711e505 include initial prompt review in user stats 2023-02-04 14:36:29 +01:00
Andreas Köpf 2db3450e9a add trollboards 2023-02-02 16:10:38 +01:00
Andreas Köpf b6bdb84019 Add endpoint to query nearby leaderboard rows (#1038)
* add is_current_user bool

* add user leaderboard surrounding window function
2023-01-31 15:05:05 +01:00
James Melvin Ebenezer 063157355c 906: update user streaks (#1016)
* fix: update user streaks
* Moved  streak_last_day_date & streak_days from UserStats to User
* Updated Alembic version
* update last_activity after tm.handle_interaction()
* periodically executed function in main.py to update the user_streak every 4hrs

* fix:removed log messages

* fix: pre commit issues

* refactor: incorporated review comments

* fix: removed the managed -scope.

* refactor: managed_tx to Outer REST Db Ops in /interaction API

* fix: pre-commit changes

* fix: added streak and last_activity_date to protocol.FrontEndUser

* fix: pre-commit fixes after merge

* fix: added streak info to user_stat_repository, leaderboard and review comments

* fix: proper 4h delay and simpler startup_time initialisation

---------

Co-authored-by: James Melvin <melvin@gameface.ai>
2023-01-31 12:27:45 +01:00
Andreas Köpf e91a645836 fix rank123 scores 2023-01-30 09:46:03 +01:00
Andreas Köpf c8d16285d0 Import message trees from jsonl file (#964)
* add new backlog_ranking tree state

* add first version of import script

* allow activation of trees during import

* add min_active_rankings_per_lang config param

* add settings docstring
2023-01-28 15:05:46 +01:00
Andreas Köpf 9bad3d6e74 Exclude certain users from leaderboard stats (#961)
Co-authored-by: Akhil Datla <66145155+akhil-datla@users.noreply.github.com>
2023-01-27 21:04:55 +01:00
Andreas Köpf 038d1cc004 last_uddated for user_stats, swtich to timestamptz 2023-01-19 22:07:08 +01:00
Vechtomov 9b98056001 change leaderboard ordering (#825) 2023-01-18 21:17:16 +01:00
dhug 6b82b2cd13 Add api auth to user stat repo (#805)
* added api_auth to user_stats_repository

* pre_commit changes

* Remove call with dev uuid

Co-authored-by: Andreas Köpf <andreas.koepf@xamla.com>
2023-01-17 20:07:39 +00:00
Andreas Köpf e58ffd64fa add /api/v1/users/{user_id}/stats endpoint (#744)
* add /api/v1/users/{user_id}/stats endpoint

* return 0 stats and add /api/v1/users/{user_id}/stats/{time_frame}

* use utcnow() as modified date for 0 stats
2023-01-15 20:24:15 +00:00
Andreas Köpf b5bb5bb7c0 Add leaderboard stats, periodic updates via fastapi-utils (#724)
* add leaderboard stats, periodic update via fastapi-utils

* count label tasks for assistant and prompter replies

* Daily stats update every 15 mins, simplify leaderboard endpoint

* add indices for some created_date columns

* make user stats update intervals configurable

* make sure intervals are positive
2023-01-15 12:04:19 +01:00