Skip to content

Commit 2795ced

Browse files
authored
Merge pull request #168 from VE-FORBRYDERNE/api-patch
Fix regex for the prompt parameter of the POST /story/end endpoint
2 parents 59e3a40 + 9ff50d8 commit 2795ced

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aiserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def delete(self, rule: str, **kwargs):
631631
api_version = None # This gets set automatically so don't change this value
632632

633633
api_v1 = KoboldAPISpec(
634-
version="1.2.0",
634+
version="1.2.1",
635635
prefixes=["/api/v1", "/api/latest"],
636636
tags=tags,
637637
)
@@ -7858,7 +7858,7 @@ def prompt_validator(prompt: str):
78587858
raise ValidationError("String does not match expected pattern.")
78597859

78607860
class SubmissionInputSchema(KoboldSchema):
7861-
prompt: str = fields.String(required=True, validate=prompt_validator, metadata={"pattern": r"^.*\S.*$", "description": "This is the submission."})
7861+
prompt: str = fields.String(required=True, validate=prompt_validator, metadata={"pattern": r"^[\S\s]*\S[\S\s]*$", "description": "This is the submission."})
78627862
disable_input_formatting: bool = fields.Boolean(load_default=True, metadata={"description": "When enabled, disables all input formatting options, overriding their individual enabled/disabled states."})
78637863
frmtadsnsp: Optional[bool] = fields.Boolean(metadata={"description": "Input formatting option. When enabled, adds a leading space to your input if there is no trailing whitespace at the end of the previous action."})
78647864

0 commit comments

Comments
 (0)