diff --git a/evaluation_examples/examples/thunderbird/030eeff7-b492-4218-b312-701ec99ee0cc.json b/evaluation_examples/examples/thunderbird/030eeff7-b492-4218-b312-701ec99ee0cc.json index a419f69..b169b6b 100644 --- a/evaluation_examples/examples/thunderbird/030eeff7-b492-4218-b312-701ec99ee0cc.json +++ b/evaluation_examples/examples/thunderbird/030eeff7-b492-4218-b312-701ec99ee0cc.json @@ -68,7 +68,7 @@ "expected": { "type": "rule", "rules": { - "unexpect": { + "expect": { "mail.identity.id1.auto_quote": { "method": "eq", "ref": false diff --git a/evaluation_examples/examples/thunderbird/06fe7178-4491-4589-810f-2e2bc9502122.json b/evaluation_examples/examples/thunderbird/06fe7178-4491-4589-810f-2e2bc9502122.json index 733a831..5a51bc8 100644 --- a/evaluation_examples/examples/thunderbird/06fe7178-4491-4589-810f-2e2bc9502122.json +++ b/evaluation_examples/examples/thunderbird/06fe7178-4491-4589-810f-2e2bc9502122.json @@ -1,7 +1,7 @@ { "id": "06fe7178-4491-4589-810f-2e2bc9502122", "snapshot": "thunderbird", - "instruction": "Could you help me back up all the email files in my profile to ~/emails.bak? Please save them separately in eml format.", + "instruction": "Could you help me back up all the email files in my inbox to ~/emails.bak? Please save them separately in eml format.", "source": "https://www.quora.com/How-do-I-backup-email-files-in-Mozilla-Thunderbird", "config": [ { diff --git a/evaluation_examples/examples/thunderbird/2ad9387a-65d8-4e33-ad5b-7580065a27ca.json b/evaluation_examples/examples/thunderbird/2ad9387a-65d8-4e33-ad5b-7580065a27ca.json index 6b89f31..f8e17ec 100644 --- a/evaluation_examples/examples/thunderbird/2ad9387a-65d8-4e33-ad5b-7580065a27ca.json +++ b/evaluation_examples/examples/thunderbird/2ad9387a-65d8-4e33-ad5b-7580065a27ca.json @@ -1,7 +1,7 @@ { "id": "2ad9387a-65d8-4e33-ad5b-7580065a27ca", "snapshot": "thunderbird", - "instruction": "Create two local folders for me: COMPANY and UNIVERSITY.", + "instruction": "Create two local folders in Thunderbird for me: COMPANY and UNIVERSITY.", "source": "https://support.mozilla.org/bm/questions/1027435", "config": [ { diff --git a/mm_agents/gpt_4v_agent.py b/mm_agents/gpt_4v_agent.py index 0dd15cf..9810eff 100644 --- a/mm_agents/gpt_4v_agent.py +++ b/mm_agents/gpt_4v_agent.py @@ -460,14 +460,18 @@ class GPT4v_Agent: with open("messages.json", "w") as f: f.write(json.dumps(messages, indent=4)) - response = self.call_llm({ - "model": self.model, - "messages": messages, - "max_tokens": self.max_tokens - }) + try: + response = self.call_llm({ + "model": self.model, + "messages": messages, + "max_tokens": self.max_tokens + }) + except: + response = "" logger.debug("RESPONSE: %s", response) + # {{{ if self.exp == "seeact": messages.append({ "role": "assistant", @@ -503,7 +507,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 @@ -516,7 +520,8 @@ class GPT4v_Agent: response = requests.post( "https://api.openai.com/v1/chat/completions", headers=self.headers, - json=payload + json=payload, + timeout=20 ) if response.status_code != 200: