The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Handle null action in AutoGPT Agent (#3274)
Zander Chasea71a2c0eb295
diff --git a/langchain/experimental/autonomous_agents/autogpt/output_parser.py b/langchain/experimental/autonomous_agents/autogpt/output_parser.pyindex d2b98c395b..3ce36afe04 100644--- a/langchain/experimental/autonomous_agents/autogpt/output_parser.py+++ b/langchain/experimental/autonomous_agents/autogpt/output_parser.py@@ -44,7 +44,8 @@ class AutoGPTOutputParser(BaseAutoGPTOutputParser):name=parsed["command"]["name"],args=parsed["command"]["args"],)- except KeyError:+ except (KeyError, TypeError):+ # If the command is null or incomplete, return an erroneous toolreturn AutoGPTAction(name="ERROR", args={"error": f"Incomplete command args: {parsed}"})