From 40569f0d0ea01af218c9f719456dc557b7ad0f7b Mon Sep 17 00:00:00 2001 From: wuyiqunLu Date: Sat, 21 Sep 2024 21:38:36 +0800 Subject: [PATCH] fix lint --- vision_agent/agent/vision_agent.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vision_agent/agent/vision_agent.py b/vision_agent/agent/vision_agent.py index 72727f49..962815aa 100644 --- a/vision_agent/agent/vision_agent.py +++ b/vision_agent/agent/vision_agent.py @@ -267,7 +267,11 @@ def chat_with_code( orig_chat.append({"role": "observation", "content": artifacts_loaded}) self.streaming_message({"role": "observation", "content": artifacts_loaded}) - user_code_action = parse_execution(last_user_message.get("content"), False) + user_code_action = None + if isinstance(last_user_message.get("content"), str): + user_code_action = parse_execution( + last_user_message.get("content"), False + ) if user_code_action is not None: user_result, user_obs = run_code_action(