* 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
* 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
* add query_incomplete_rankings()
* Add SQL queries for TreeManager task selection
* first working version of TreeManager.next_task()
* remove old generate_task(), add mandatory_labels to text_labels task
* Add ConversationMessage list to Ranking tasks
* add more sophisticated sql queries to find extendible trees
* add TreeManager.query_extendible_parents()
* fix task validation, seed data insertion (reviewed)
* provide user for task selection in text-frontend
* enter 'growing' state
* enter 'aborted_low_grade' state
* enter 'ranking' state
* check tree 'growing' state upon relpy insertion
* exclude user from labeling their own messages (added DEBUG_ALLOW_SELF_LABELING setting)
* add DEBUG_ALLOW_SELF_LABELING to docker-compose.yaml
* fix ranking submission
* add query_tree_ranking_results()
* add ranked_message_ids to RankingReactionPayload
* fix reply_messages instead of prompt_messages
* incorment 'ranking_count' of ranked replies
* added logic to check_condition_for_scoring_state
* changes to msg_tree_state_machine
* pre-commit changes
* enter 'ready_for_scoring' state
* re-add HF embedding call (lost during merge)
* use prepare_conversation() helper for seed-data creation
* Partially add user specified task selection
Co-authored-by: Daniel Hug <danielpatrickhug@gmail.com>
* Extract classes UserRepository and TaskRepository from PromptRepository
* move close_task() to TaskRepository and get_user_leaderboard to UserRepository()
* Use UserRepository in leaderboards endpoint, add type annotation to leaderboards endpoint
* update ConversationMessage in protocal.py
* updated ConversationMessage instantiations in tasks.py and util.py to include message_id and frontend_message_id
* changed message_id and frontend_message_id to type UUID
* update ConversationMessage instantiation in main.py to include message_id and frontend_message_id"
* changed frontend_message_id to type str
* ran precomit
* Add DEBUG_USD_SEED_DATA_PATH in config to make seed data flexible
* reformat
* Copy test_data folder in Dockerfile.backend, correct DEBUG_USE_SEED_DATA_PATH in cofig
* - make DEBUG_USE_SEED_DATA_PATH to absolute path
- correct test_data path in Dockerfile.backend
Using a shared protocol to serialize the error in the backend
allows clients to use that same protocol to deserialize it.
Changes to this protocol will be caught in tests.