Script chat gpt fix

Dear UI.vision team,

I hope this email finds you well. I am writing to request assistance with running a macro using your software. The macro I am having trouble with is as follows:

{
  "Name": "gravando google 2",
  "CreationDate": "2023-4-11",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.google.com.br/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div/div[2]",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div/div[2]",
        "xpath=//body/div/div[2]",
        "css=body > div.L3eUgb > div.o3j99.LLD4me.yr19Zb.LS8OJ"
      ],
      "Description": ""
    },
    {
      "Command": "executeScript",
      "Target": "var request = async () => {var response = await fetch('https://api.openai.com/v1/engines/davinci-codex/completions', {method: 'POST',headers: {'Content-Type': 'application/json', 'Authorization': 'Bearer {API GPT  KEY}'},body: JSON.stringify({'prompt': 'Pesquisar aleatoriamente no Google','max_tokens': 50,'temperature': 0.7,'n': 1,'stop': '.',})});var data = await response.json();document.getElementsByName('q')[0].value = data.choices[0].text;};request();",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div/div[3]",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div/div[3]",
        "xpath=//body/div/div[3]",
        "css=body > div.L3eUgb > div.o3j99.ikrT4e.om7nvf"
      ],
      "Description": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "xpath=/html/body/div/div[3]/form/div/div/div[4]/center/input",
      "Value": "",
      "Targets": [
        "name=btnK",
        "xpath=/html/body/div/div[3]/form/div/div/div[4]/center/input",
        "xpath=//div[4]/center/input",
        "css=body > div.L3eUgb > div.o3j99.ikrT4e.om7nvf > form > div:nth-child(1) > div.A8SBwf > div.FPdoLc.lJ9FBc > center > input.gNO89b"
      ],
      "Description": ""
    }
  ]
}

I suspect the issue may be related to the script in ChatGPT, but I am not entirely sure. Could you please review the macro and provide any guidance on what might be causing the problem?

Thank you very much for your help. I look forward to hearing back from you soon.

Best regards,

Hi, did you figure out a solution for this meanwhile? I also want to start using chatgpt with uivision rpa :wink: