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
StanGirard added a commit that referenced this pull request Sep 30, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.316 (2024-09-30)

## What's Changed
* fix(core): enforce langchain <0.3 for pydantic v1 by @StanGirard in
#3217
* chore(main): release core 0.0.16 by @StanGirard in
#3218
* feat(assistants): mock api by @StanGirard in
#3195
* chore(examples): fix chainlit example by @StanGirard in
#3223
* feat(integration): Notion by @chloedia in
#3173
* fix(migration): order migrations by @StanGirard in
#3231
* feat: remove n+1 query knowledge by @AmineDiro in
#3238
* feat: introducing configurable retrieval workflows by
@jacopo-chevallard in #3227
* fix: wrong default path for CHAT_LLM_CONFIG_PATH env variable by
@jacopo-chevallard in #3247
* fix(frontend): sync folder for premium users by @Zewed in
#3251
* fix: correctly passing the prompt provided by the user by
@jacopo-chevallard in #3252
* fix: add sync user id aget_files by @AmineDiro in
#3261
* feat: update sync_user.py to include sync user id in aget_files call
by @StanGirard in #3276
* chore: update Dockerfile dependencies and copy files by @StanGirard in
#3277
* chore: add wget to Dockerfile dependencies by @StanGirard in
#3279


**Full Changelog**:
v0.0.315...v0.0.316

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
StanGirard added a commit that referenced this pull request Oct 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.17](core-0.0.16...core-0.0.17)
(2024-10-16)


### Features

* **assistant:** cdp
([#3305](#3305))
([b767f19](b767f19))
* **assistants:** mock api
([#3195](#3195))
([282fa0e](282fa0e))
* introducing configurable retrieval workflows
([#3227](#3227))
([ef90e8e](ef90e8e))


### Bug Fixes

* fixing pdf parsing
([#3349](#3349))
([367242a](367242a))


### Documentation

* **core:** init ([#3365](#3365))
([bb572a2](bb572a2))
* **fix:** fixed warnings from griffe
([#3381](#3381))
([1a38798](1a38798))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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