fix: add prompt as field_type for validation
This commit is contained in:
parent
9d8b08d4a9
commit
a344ef2986
1 changed files with 2 additions and 1 deletions
|
|
@ -254,11 +254,12 @@ class PromptFrontendNode(FrontendNode):
|
||||||
# if field.field_type == "StringPromptTemplate"
|
# if field.field_type == "StringPromptTemplate"
|
||||||
# change it to str
|
# change it to str
|
||||||
if field.field_type == "StringPromptTemplate" and "Message" in str(name):
|
if field.field_type == "StringPromptTemplate" and "Message" in str(name):
|
||||||
field.field_type = "str"
|
field.field_type = "prompt"
|
||||||
field.multiline = True
|
field.multiline = True
|
||||||
field.value = HUMAN_PROMPT if "Human" in field.name else SYSTEM_PROMPT
|
field.value = HUMAN_PROMPT if "Human" in field.name else SYSTEM_PROMPT
|
||||||
if field.name == "template" and field.value == "":
|
if field.name == "template" and field.value == "":
|
||||||
field.value = DEFAULT_PROMPT
|
field.value = DEFAULT_PROMPT
|
||||||
|
field.field_type = "prompt"
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"Union" in field.field_type
|
"Union" in field.field_type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue