mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-28 05:54:55 +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:
parent
898362de81
commit
5e60d65917
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user