* only ranking assistant replies by default
* add tasks/availability endpoint allow to specify desired task
* move rank_prompter_replies option to TreeManagerConfiguration
* fix type annotation
* remove desired_task_type from _random_task_selection()
* fix typo
* Convert query_tree_size to sqlachemy, return 'full' text-labeling tasks if they were explicitly requested
* fix: isolation level and nested db.commit() with retry wrappers on concurrent update errors
* refactor: incorporated review comments
changes decorator methods to managed_tx_method and async_managed_tx_method
new enum CommitMode
removed commented commit() from the previous commits
* fix: merge pre-commit errors
* fix: merge pre-commit changes
* fix: conflict in existing OasstErrorCode
* refactor: Added a refresh just to be sure that the select command is triggered on the mapped object
* fix: added refresh for async decorator
Co-authored-by: James Melvin <melvin@gameface.ai>
* added root tokens and endpoint for adding api keys
* Change down revision to current alembic head
* removed added_by_root_token
* refactored description
* fixed jinja errors
Co-authored-by: Andreas Köpf <andreas.koepf@provisio.com>
* 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>
* Add endpoint to resolve frontend user by auth method and username
* Require client ID for frontend user lookup
* Remove unnecessary if check
* Fix PromptRepository -> UserRepository
* Convert to protocol User
* Move User prep
* Address review comments
* 404 -> HTTP_404_NOT_FOUND
* 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
* Implement label task for initial prompts and replies
* Resolve formatting
* Include missing argument
* Modify text_labels API to match new model, update DB schema accordingly
* Send valid labels as part of label tasks
* Send correctly formatted valid_labels list
* Fix request format
* Fix request details for text-frontend reply label task
* Include message_id in tasks
* Address review comments
* Fix alembic tree
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.
* Leaderboard endpoints proof of concept
- New leaderboards router
- Two endpoints /api/v1/leaderboards/assistant & /api/v1/leaderboards/prompter
- Function in prompt_repository to calculate user scores
* Separating create vs 'eventual' evaluate routes
* Adding display_name to result
* Missing / in routes
* Updating route to be experimental
* Fixing format for pre-commit