mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
simplify code
This commit is contained in:
parent
8c1b9db7d2
commit
12208154ee
1 changed files with 2 additions and 2 deletions
|
|
@ -222,10 +222,10 @@ def run_after_exp_and_passon_next_retry(logger: "loguru.Logger") -> Callable[["R
|
|||
}
|
||||
"""
|
||||
if retry_state.outcome.failed:
|
||||
if len(retry_state.args) > 0:
|
||||
if retry_state.args:
|
||||
# # can't be used as args=retry_state.args
|
||||
func_param_output = retry_state.args[0]
|
||||
elif len(retry_state.kwargs) > 0:
|
||||
elif retry_state.kwargs:
|
||||
func_param_output = retry_state.kwargs.get("output", "")
|
||||
exp_str = str(retry_state.outcome.exception())
|
||||
logger.warning(f"parse json from content inside [CONTENT][/CONTENT] failed at retry "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue