* add tos_acceptance_date column to user
* send 451 UNAVAILABLE_FOR_LEGAL_REASONS status
* add create user REST endpoint
* adapt text-frontend to ToS requirements
* set DEBUG_IGNORE_TOS_ACCEPTANCE default to True (temporary change)
* update down revision to f60958968ff8
* add full message to prompt-labeling & always require full prompt labeling
* always sending conversation, also for initial prompt labeling
* update type annotation
* 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>
* 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
* added changes for user specific message dumplication filter, added error codes, and settings variable as described in Draft PR #926, ran precommit
* removed debug statements
* add missing await to async_managed_tx_method
* add 2nd missing await to async_managed_tx_method
* added changes for user specific message dumplication filter, added error codes, and settings variable as described in Draft PR #926, ran precommit
* removed debug statements
* assert task user matches prompt_repository user
* removed assert statments
* moved duplicate_message_filter and message_length check into store_text_reply
* removed old checks in tree_manager
* add parsing of additional x-oasst-user header field
* simplify passing FrontendUserId to PromptRepository, use frontend_user_id on more message enpoints
* remove unrelated change
* fix: transaction error handling
* refactor: retry handling for all decorators as per review comments
* fix: raising retry exhausted error
* fix: avoid auto refresh on RollBack and review comments
* removed refresh_result param from managed_tx_function
---------
Co-authored-by: James Melvin <melvin@gameface.ai>
Co-authored-by: Andreas Köpf <andreas.koepf@xamla.com>
* add LabelDescription list to labeling tasks
* make +1 & -1 emoji exclusive (only one of both or none)
* add red_flag emoji to message when reported
* fix task's valid labels
* fix typo
* add preferred lonely_children extension
* simplify sampling process, lower the probability to 25%
* exclude parents for replies that were recently used
* lonely children := count > 0
* consider only tasks not done for parent exclusion
* increase lonely child sampling probability
* add disposition to text labeling tasks
* add emoji stats to ConversationMessage
* add user emoji augmentation for message queries
* add auth_method,username to message queries (query emoji status)
* add auth_method+username for single message
* fix param name typo
* only join rows when message.emojis != JSON.NULL
* formatting
* make sure emojis and user_emojis default to {}, []
* remove init_user(), use fresh empty default collections