🐛 fix(chains.py): set prompt field as required when value is None
The prompt field was previously set as not required when no value was provided, but this is not the intended behavior. The prompt field should always be required, even if the default prompt is used. This commit fixes the issue by setting the required attribute to True when the value is None.
This commit is contained in:
parent
f0503d2eb0
commit
a758f48b88
1 changed files with 1 additions and 2 deletions
|
|
@ -21,8 +21,7 @@ class ChainFrontendNode(FrontendNode):
|
|||
|
||||
# Separated for possible future changes
|
||||
if field.name == "prompt" and field.value is None:
|
||||
# if no prompt is provided, use the default prompt
|
||||
field.required = False
|
||||
field.required = True
|
||||
field.show = True
|
||||
field.advanced = False
|
||||
if field.name == "memory":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue