Commit d2826b6
authored
chore: add dropdown to select model type (#1043)
## TL;DR
Adds dropdown to select the type of generalised model to use for AISAY
action.
Context: AISAY added a new model type called 'Vision' to their
generalised model.
AISAY's API doc:
https://app.swaggerhub.com/apis-docs/DAMIENSKTWORK/bgp-aisay_document_extraction_api/1.0.11#/DocumentParserResponse
## Solution
**Improvements**:
- Add dropdown to select generalised model: `Standard` (default) or
`Vision` (new)
## How to test?
- [ ] Existing AISAY actions work as intended without making any changes
- [ ] Show the model type as `Standard` by default
- [ ] Existing AISAY action can be updated to use new `Vision` model
- [ ] Create new AISAY action with `Vision` model and runs as intended
- [ ] Create new AISAY action with `Standard` model and runs as intended
## What changed?
* Additional dropdown field called `Model type` with the following
options: `Standard` (default), `Vision` (new)
* Add tests to validate the model type selection
* Add model type to api call as `additional_features`
## Before & After Screenshots
**BEFORE**:
<img width="975" alt="Screenshot 2025-06-06 at 2 49 19 PM"
src="https://github.com/user-attachments/assets/9063c9ef-7770-4e96-af14-7fa6e0f750a8"
/>
**AFTER**:
<img width="968" alt="Screenshot 2025-06-06 at 2 52 50 PM"
src="https://github.com/user-attachments/assets/24103909-31da-4b01-be8f-7f0c49cc4d2e"
/>
https://github.com/user-attachments/assets/b0b0093f-75d6-4457-9552-02ffe80fa3481 parent 2d6626d commit d2826b6
File tree
4 files changed
+92
-17
lines changed- packages/backend/src/apps/aisay
- __tests__/common
- actions/use-generalised-model
- common
4 files changed
+92
-17
lines changedLines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
55 | 85 | | |
56 | 86 | | |
57 | 87 | | |
| |||
Lines changed: 27 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
19 | 33 | | |
20 | 34 | | |
21 | 35 | | |
| |||
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | | - | |
59 | 71 | | |
60 | | - | |
61 | | - | |
| 72 | + | |
| 73 | + | |
62 | 74 | | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 79 | + | |
71 | 80 | | |
72 | | - | |
73 | | - | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| 89 | + | |
| 90 | + | |
80 | 91 | | |
81 | | - | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
| |||
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
39 | 66 | | |
40 | 67 | | |
41 | 68 | | |
| |||
0 commit comments