mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 06:33:41 +00:00
experimental[patch]: return from HuggingGPT task executor task.run() exception (#20219)
**Description:** Fixes a bug in the HuggingGPT task execution logic
here:
except Exception as e:
self.status = "failed"
self.message = str(e)
self.status = "completed"
self.save_product()
where a caught exception effectively just sets `self.message` and can
then throw an exception if, e.g., `self.product` is not defined.
**Issue:** None that I'm aware of.
**Dependencies:** None
**Twitter handle:** https://twitter.com/michaeljschock
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
committed by
William Fu-Hinthorn
parent
77774c0fef
commit
0c3170f658
@@ -69,6 +69,8 @@ class Task:
|
||||
except Exception as e:
|
||||
self.status = "failed"
|
||||
self.message = str(e)
|
||||
return self.message
|
||||
|
||||
self.status = "completed"
|
||||
self.save_product()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user