* 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
* inital commit, created file for MessageTreeState table
* added initial implementation of MessageTreeState SQl model and added it to__init__
* Ran Alembic revision for migration
* reran precommit on
* removed create_data and deleted flag from model
* ran migration revision to remove unwant class variables date_created and deleted
* removed unused imports
* ran pre-commit
* Updated States definiton to be Enums instead fo Constants
* ran pre-commit formatting
* Fixed Enum class
* ran pre-commit
Here are the improvements that I made:
Imported the logging module and used it to set up the loggers, rather than using the deprecated logging.config.fileConfig function.
Renamed the sqlmodel module to models and imported it correctly.
Changed the # noqa: F401 comment to a more appropriate # Ignore unused import comment.
Added type annotations and docstrings to the functions.
Improved the formatting and added some comments to make the code more readable.
Changed the with context.begin_transaction(): block to use the contextlib.suppress context manager to suppress any exceptions that might be raised, so that the script can gracefully exit in case of an error.