Browse Source
fix(nodes): handle errors in question_classifier and parameter_extractor (#11927)
Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/0.14.2
-LAN-
10 months ago
No account linked to committer's email address
|
|
|
|
|
|
|
|
error=str(e), |
|
|
error=str(e), |
|
|
metadata={}, |
|
|
metadata={}, |
|
|
) |
|
|
) |
|
|
|
|
|
except Exception as e: |
|
|
|
|
|
return NodeRunResult( |
|
|
|
|
|
status=WorkflowNodeExecutionStatus.FAILED, |
|
|
|
|
|
inputs=inputs, |
|
|
|
|
|
process_data=process_data, |
|
|
|
|
|
outputs={"__is_success": 0, "__reason": "Failed to invoke model", "__error": str(e)}, |
|
|
|
|
|
error=str(e), |
|
|
|
|
|
metadata={}, |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
error = None |
|
|
error = None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
llm_usage=usage, |
|
|
llm_usage=usage, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
except ValueError as e: |
|
|
|
|
|
|
|
|
except Exception as e: |
|
|
return NodeRunResult( |
|
|
return NodeRunResult( |
|
|
status=WorkflowNodeExecutionStatus.FAILED, |
|
|
status=WorkflowNodeExecutionStatus.FAILED, |
|
|
inputs=variables, |
|
|
inputs=variables, |