mirror of https://github.com/langgenius/dify.git
add inputs for workflow_started event
This commit is contained in:
parent
f7e4f0a988
commit
5a4ea0932a
|
|
@ -179,6 +179,7 @@ class WorkflowStartStreamResponse(StreamResponse):
|
|||
id: str
|
||||
workflow_id: str
|
||||
sequence_number: int
|
||||
inputs: dict
|
||||
created_at: int
|
||||
|
||||
event: StreamEvent = StreamEvent.WORKFLOW_STARTED
|
||||
|
|
|
|||
|
|
@ -267,6 +267,8 @@ class WorkflowCycleManage:
|
|||
:param workflow_run: workflow run
|
||||
:return:
|
||||
"""
|
||||
inputs = {variable: value for variable, value in workflow_run.inputs_dict.items()
|
||||
if variable != 'sys.conversation'}
|
||||
return WorkflowStartStreamResponse(
|
||||
task_id=task_id,
|
||||
workflow_run_id=workflow_run.id,
|
||||
|
|
@ -274,6 +276,7 @@ class WorkflowCycleManage:
|
|||
id=workflow_run.id,
|
||||
workflow_id=workflow_run.workflow_id,
|
||||
sequence_number=workflow_run.sequence_number,
|
||||
inputs=inputs,
|
||||
created_at=int(workflow_run.created_at.timestamp())
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue