-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/prompt key required field (#885)
* added required field in prompt key * required fields constant and added required field in promptstudio helper * added frontend required field prompt key functionality * added prompt service required key adding in metadata * added required key in prompt studio registry and removed some unwanted codes * changed required field bool to option with any/all * made changes in frontend to support option required * prompt service changes to support required options field * required field based on enforce type * changed required choices to class * frontend condition fail issue fix in highlight data * required field text changes as per the feedback * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * addressed pr comments * added info for required fields --------- Signed-off-by: vishnuszipstack <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ee41dff
commit bd7ec42
Showing
15 changed files
with
162 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
backend/prompt_studio/prompt_studio_v2/migrations/0003_toolstudioprompt_required.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.1 on 2024-12-10 10:07 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("prompt_studio_v2", "0002_alter_toolstudioprompt_enforce_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="toolstudioprompt", | ||
name="required", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
backend/prompt_studio/prompt_studio_v2/migrations/0004_alter_toolstudioprompt_required.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.1 on 2024-12-12 08:28 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("prompt_studio_v2", "0003_toolstudioprompt_required"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="toolstudioprompt", | ||
name="required", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[("all", "All values required"), ("any", "Any value required")], | ||
default=None, | ||
max_length=3, | ||
null=True, | ||
), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
backend/prompt_studio/prompt_studio_v2/migrations/0005_alter_toolstudioprompt_required.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.1 on 2024-12-20 06:35 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("prompt_studio_v2", "0004_alter_toolstudioprompt_required"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="toolstudioprompt", | ||
name="required", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[("all", "All values required"), ("any", "Any value required")], | ||
db_comment="Field to store weather the values all values or any values required. This is used for HQR, based on the value approve or finish review", | ||
default=None, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,3 +299,7 @@ | |
.info-circle-colored { | ||
color: #f0ad4e; | ||
} | ||
|
||
.required-checkbox-padding{ | ||
padding-left: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters