diff --git a/mm_agents/gpt_4v_agent.py b/mm_agents/gpt_4v_agent.py index b94a4f9..24a232d 100644 --- a/mm_agents/gpt_4v_agent.py +++ b/mm_agents/gpt_4v_agent.py @@ -481,11 +481,13 @@ class GPT4v_Agent: "messages": messages, "max_tokens": self.max_tokens }) - except: + except Exception as e: + logger.warning("LLM INVOCATION ERROR: %s", str(e)) response = "" logger.debug("RESPONSE: %s", response) + # {{{ if self.exp == "seeact": messages.append({ "role": "assistant", @@ -521,7 +523,7 @@ class GPT4v_Agent: except Exception as e: print("Failed to parse action from response", e) actions = None - self.thoughts.append("") + self.thoughts.append("") # }}} return actions diff --git a/requirements.txt b/requirements.txt index ab1dcf1..bce1ae0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,4 +39,6 @@ fastdtw odfpy openai func-timeout -beautifulsoup4 \ No newline at end of file +beautifulsoup4 +dashscope +google-generativeai