Format option implemented in UI2

This commit is contained in:
ebolam
2022-08-22 11:51:10 -04:00
parent 47037d51ad
commit 7ec192117f
5 changed files with 260 additions and 69 deletions

View File

@@ -398,7 +398,87 @@ gensettingstf = [
"sub_path": "Other",
"classname": "system",
"name": "alt_gen"
}
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Trim incomplete sentences",
"id": "frmttriminc",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Remove text after last sentence closure. If no closure is found, all tokens will be returned.",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmttriminc"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Remove blank lines",
"id": "frmtrmblln",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Replace double newlines (\\n\\n) with single newlines to avoid blank lines.",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtrmblln"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Remove special characters",
"id": "frmtrmspch",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Remove special characters (@,#,%,^, etc)",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtrmspch"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Automatic spacing",
"id": "frmtadsnsp",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Add spaces automatically if needed",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtadsnsp"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Single Line",
"id": "singleline",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Only allows the AI to output anything before the enter",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "singleline"
},
]
gensettingsik =[{
@@ -631,7 +711,87 @@ gensettingsik =[{
"sub_path": "Other",
"classname": "system",
"name": "alt_gen"
}
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Trim incomplete sentences",
"id": "frmttriminc",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Remove text after last sentence closure. If no closure is found, all tokens will be returned.",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmttriminc"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Remove blank lines",
"id": "frmtrmblln",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Replace double newlines (\\n\\n) with single newlines to avoid blank lines.",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtrmblln"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Remove special characters",
"id": "frmtrmspch",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Remove special characters (@,#,%,^, etc)",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtrmspch"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Automatic spacing",
"id": "frmtadsnsp",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Add spaces automatically if needed",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "frmtadsnsp"
},
{
"UI_V2_Only": True,
"uitype": "toggle",
"unit": "bool",
"label": "Single Line",
"id": "singleline",
"min": 0,
"max": 1,
"step": 1,
"default": 0,
"tooltip": "Only allows the AI to output anything before the enter",
"menu_path": "Interface",
"sub_path": "Formatting",
"classname": "user",
"name": "singleline"
},
]
formatcontrols = [{