Merge branch 'zdy'
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"unexpect": {
|
||||
"expect": {
|
||||
"mail.identity.id1.auto_quote": {
|
||||
"method": "eq",
|
||||
"ref": false
|
||||
|
||||
@@ -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": [
|
||||
{
|
||||
|
||||
@@ -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": [
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user