mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
fix(api): fix human input form substitution
Fix the issues that output fields are not properly replaced for humaninput form.
This commit is contained in:
@ -221,11 +221,11 @@ class TestHumanInputNodeData:
|
||||
|
||||
A content is required:
|
||||
|
||||
{{#$outputs.content#}}
|
||||
{{#$output.content#}}
|
||||
|
||||
A ending is required:
|
||||
|
||||
{{#$outputs.ending#}}
|
||||
{{#$output.ending#}}
|
||||
"""
|
||||
|
||||
node_data = HumanInputNodeData(title="Human Input", form_content=content)
|
||||
@ -407,7 +407,7 @@ class TestHumanInputNodeRenderedContent:
|
||||
|
||||
node_data = HumanInputNodeData(
|
||||
title="Human Input",
|
||||
form_content="Name: {{#$outputs.name#}}",
|
||||
form_content="Name: {{#$output.name#}}",
|
||||
inputs=[
|
||||
FormInput(
|
||||
type=FormInputType.TEXT_INPUT,
|
||||
|
||||
@ -22,7 +22,7 @@ class _FakeFormRepository:
|
||||
return self._form
|
||||
|
||||
|
||||
def _build_node(form_content: str = "Please enter your name:\n\n{{#$outputs.name#}}") -> HumanInputNode:
|
||||
def _build_node(form_content: str = "Please enter your name:\n\n{{#$output.name#}}") -> HumanInputNode:
|
||||
system_variables = SystemVariable.empty()
|
||||
system_variables.workflow_execution_id = str(uuid.uuid4())
|
||||
graph_runtime_state = GraphRuntimeState(
|
||||
|
||||
Reference in New Issue
Block a user