Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(assistants): mock api #3195

Merged
merged 20 commits into from
Sep 18, 2024
Merged

feat(assistants): mock api #3195

merged 20 commits into from
Sep 18, 2024

Conversation

StanGirard
Copy link
Collaborator

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Checklist before requesting a review

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have ideally added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Screenshots (if appropriate):

Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quivrapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 9:59am

The code changes in `gtasks.sql` add a new migration file for creating the `tasks` table in the Supabase database. This table includes columns for `id`, `pretty_id`, `user_id`, `status`, `creation_time`, `answer_raw`, and `answer_pretty`. The migration also sets up row level security and defines policies for user access.
The code changes introduce a new DTO class called CreateTask in the `assistant/dto/inputs.py` file. This DTO includes a `pretty_id` field of type string. Additionally, the `create_task` method in the `TasksInterface` interface has been updated to accept a `CreateTask` object instead of a `Task` object.

Note: The recent user commits and repository commits are not directly related to the code changes in `assistant/dto/inputs.py` and `TasksInterface` and are not considered for the commit message.
@StanGirard StanGirard changed the title init feat(assistants): mock api Sep 11, 2024
The code changes add the Assistant entity and update the get_assistants endpoint in the assistant_routes.py file. The Assistant entity includes properties for name, description, and settings, which include a list of AssistantInput objects. The get_assistants endpoint now returns a list of Assistant objects.

Note: The recent user commits and repository commits are not directly related to the code changes in assistant_routes.py and assistant_entity.py and are not considered for the commit message.
The code changes in `assistant_routes.py` and `assistant_entity.py` add the `file1_name` and `file2_name` properties to the `Assistant` model. This allows for storing and retrieving file names associated with each assistant.

Note: The recent user commits and repository commits are not directly related to the code changes in `assistant_routes.py` and `assistant_entity.py` and are not considered for the commit message.
The code changes in `assistant_routes.py` and `assistant_entity.py` introduce the `file1_name` and `file2_name` properties to the `Assistant` model. This allows for storing and retrieving file names associated with each assistant.
The code changes in `assistant_routes.py` add file upload functionality to the `create_task` endpoint. This allows users to upload files associated with each task. The uploaded files are stored in the storage system and linked to the task using unique identifiers. This feature enhances the functionality of the assistant module.

Note: The recent user commits and repository commits are not directly related to the code changes in `assistant_routes.py` and are not considered for the commit message.
The code changes in the `task_interface.py`, `tasks_service.py`, and `tasks.py` files add the `update_task` method to the `TasksInterface` interface and `TasksRepository` class. This method allows updating a task by its ID with the provided task updates. This feature enhances the functionality of the assistant module.
Update .gitignore to exclude *.pkl files. Also, update the backend dependencies in requirements-dev.lock and requirements.lock files. This ensures that the project uses the latest versions of the dependencies and keeps the codebase up to date.
The code changes in `inputs.py` and `task_entity.py` add the `assistant_id` field of type int and the `settings` field of type dict to the `CreateTask` DTO and `Task` entity respectively. This allows for capturing the assistant ID and associated settings when creating a new task. This feature enhances the functionality of the assistant module.
The code changes in `assistants.py` and `celery_worker.py` remove the unused `file1_name_path` and `file2_name_path` parameters from the `process_assistant` and `process_assistant_task` functions. These parameters were not being used in the function logic and were unnecessary. This refactor improves code readability and removes unnecessary clutter.
The code changes in `pdf_generator.py` remove unnecessary code and improve the readability of the `PDFGenerator` class. This refactor simplifies the logic and removes unused variables, resulting in cleaner and more maintainable code.
StanGirard and others added 2 commits September 18, 2024 11:56
The code changes in `inputs.py` remove the unused `json` import and the `to_py_dict` method from the `InputAssistant` class. This improves code readability and removes unnecessary clutter.
@StanGirard StanGirard marked this pull request as ready for review September 18, 2024 09:57
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. area: backend Related to backend functionality or under the /backend directory labels Sep 18, 2024
@StanGirard StanGirard merged commit 282fa0e into main Sep 18, 2024
11 checks passed
@StanGirard StanGirard deleted the feat/mock-api-assistants branch September 18, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Related to backend functionality or under the /backend directory size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant