mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-19 21:09:06 +08:00
fix: change to use convert_stream_full_response
This commit is contained in:
parent
db726e02a0
commit
e39eddab03
@ -22,7 +22,7 @@ class AppGenerateResponseConverter(ABC):
|
||||
else:
|
||||
|
||||
def _generate_full_response() -> Generator[dict | str, Any, None]:
|
||||
yield from cls.convert_stream_simple_response(response)
|
||||
yield from cls.convert_stream_full_response(response)
|
||||
|
||||
return _generate_full_response()
|
||||
else:
|
||||
|
@ -292,9 +292,9 @@ class WorkflowCycleManage:
|
||||
db.session.query(WorkflowNodeExecution).filter(WorkflowNodeExecution.id == workflow_node_execution.id).update(
|
||||
{
|
||||
WorkflowNodeExecution.status: WorkflowNodeExecutionStatus.SUCCEEDED.value,
|
||||
WorkflowNodeExecution.inputs: json.dumps(inputs) if inputs else None,
|
||||
WorkflowNodeExecution.process_data: json.dumps(process_data) if event.process_data else None,
|
||||
WorkflowNodeExecution.outputs: json.dumps(outputs) if outputs else None,
|
||||
WorkflowNodeExecution.inputs: json.dumps(inputs) if inputs else "{}",
|
||||
WorkflowNodeExecution.process_data: json.dumps(process_data) if event.process_data else "{}",
|
||||
WorkflowNodeExecution.outputs: json.dumps(outputs) if outputs else "{}",
|
||||
WorkflowNodeExecution.execution_metadata: execution_metadata,
|
||||
WorkflowNodeExecution.finished_at: finished_at,
|
||||
WorkflowNodeExecution.elapsed_time: elapsed_time,
|
||||
@ -306,9 +306,9 @@ class WorkflowCycleManage:
|
||||
process_data = WorkflowEntry.handle_special_values(event.process_data)
|
||||
|
||||
workflow_node_execution.status = WorkflowNodeExecutionStatus.SUCCEEDED.value
|
||||
workflow_node_execution.inputs = json.dumps(inputs) if inputs else None
|
||||
workflow_node_execution.process_data = json.dumps(process_data) if process_data else None
|
||||
workflow_node_execution.outputs = json.dumps(outputs) if outputs else None
|
||||
workflow_node_execution.inputs = json.dumps(inputs) if inputs else "{}"
|
||||
workflow_node_execution.process_data = json.dumps(process_data) if process_data else "{}"
|
||||
workflow_node_execution.outputs = json.dumps(outputs) if outputs else "{}"
|
||||
workflow_node_execution.execution_metadata = execution_metadata
|
||||
workflow_node_execution.finished_at = finished_at
|
||||
workflow_node_execution.elapsed_time = elapsed_time
|
||||
|
Loading…
x
Reference in New Issue
Block a user