About ChatGPT...

I created a quick empty-trigger macro to set a random integer from 1 to 6 and display the result. I opened the macro file as text and copied & pasted the JSON.

ChatGPT could tell my idea was a very simple die-roll simulator.

Suppose I or anyone does the same with more ambitious macros. Show it what a macro does. Tell it hypothetical refinements.

Could it edit the JSON and improve the macro? Or is it far more likely to make a flawed macro that MacroDroid can't open?
 

Qarboz

Well-known member
In my opinion the opposite approach is better; AI can do a rough job but the refinements and optimizations are best done by a human

That said, IMHO the best use of AI is to use them as an aid in search data, but to solve problems it is better to use your own intelligence; otherwise there is the risk that by delegating the problems to a machine (over which we have no control) on the day it will not be available because, for example, it is faulty or charged $1000/month or lack of connectivity, we will no longer be able to solve trivial problems such as peeing...
 

FrameXX

Well-known member
is it far more likely to make a flawed macro that MacroDroid can't open?
It is.

ChatGPT isn't bad at generating and improving code when we talk about conventional programming languages like Javascript, Python, etc. There are hundreds of thousands of code snippets in these languages on the internet that ChatGPT could learn from. But how many MacroDroid macro JSONs are out there? Not many. ChatGPT knows the JSON structure very well and it's able to understand what your macro should do, and it might even be able to reliably change some parameters of the macro, but when it comes to adding something new to the macro, it won't know what keys and values to add to the JSON structure.

For example, it doesn't know that the MacroDroid notification action uses the m_runMacroWhenPressed boolean key/parameter, and it will probably make something up or not use the key at all. ChatGPT doesn't even have an exact idea of all the actions, triggers and constraints MacroDroid macro can have. If you ask it, it will list a large number of them, but it will miss a lot of them or even come up with some generic actions that MacroDroid doesn't have, and I'm not even talking about the fact that it can't know about any of the actions added after November 2021.
 

Endercraft

Moderator (& bug finder :D)
It is.

ChatGPT isn't bad at generating and improving code when we talk about conventional programming languages like Javascript, Python, etc. There are hundreds of thousands of code snippets in these languages on the internet that ChatGPT could learn from. But how many MacroDroid macro JSONs are out there? Not many. ChatGPT knows the JSON structure very well and it's able to understand what your macro should do, and it might even be able to reliably change some parameters of the macro, but when it comes to adding something new to the macro, it won't know what keys and values to add to the JSON structure.

For example, it doesn't know that the MacroDroid notification action uses the m_runMacroWhenPressed boolean key/parameter, and it will probably make something up or not use the key at all. ChatGPT doesn't even have an exact idea of all the actions, triggers and constraints MacroDroid macro can have. If you ask it, it will list a large number of them, but it will miss a lot of them or even come up with some generic actions that MacroDroid doesn't have, and I'm not even talking about the fact that it can't know about any of the actions added after November 2021.
Would providing it with a pre made list of JSON entries corresponding to actions/triggers/constraints/everything else before making the request work ?
 

FrameXX

Well-known member
Would providing it with a pre made list of JSON entries corresponding to actions/triggers/constraints/everything else before making the request work ?

Prerequisities

  • You are able to create such a list (that could be hard)
  • The list fits into memory with the first upcoming question and answer
    • ChatGPT 3.5 Turbo has limited memory to about 4000 words including your messages and it's messages
 
Latest bit of help on one of my questions. Answers 1 & 2 look workable, though not what I had in mind. Is 3 true?! I haven't checked carefully, but it seems to me configuring that action would show no such option.

ChatGPT wrote:

There are a few ways for two macros to pass local variable values to each other without using global variables or webhooks. Here are a few possibilities:

1. Use the MacroDroid clipboard action to store the value of a local variable in one macro, and then read that value from the clipboard in the other macro. You can use the Set Clipboard action to set the clipboard to the value of a local variable, and then use the Clipboard Contents condition to read the value from the clipboard in the other macro.

2. Use a file on the device to store the value of a local variable in one macro, and then read that value from the file in the other macro. You can use the Write File action to write the value of a local variable to a file, and then use the File Exists condition to check for the existence of the file and the Read File action to read the value from the file in the other macro.

3. Use the Run Macro action to run one macro from the other, passing the value of a local variable as a parameter. You can use the Run Macro action to run one macro from the other and pass the value of a local variable as a parameter. In the receiving macro, you can use the %par1, %par2, etc. variables to access the values of the parameters passed to the macro.

These are just a few examples of ways to pass local variable values between macros. The specific approach you choose may depend on the nature of the variables you need to pass and the specific requirements of your macros.
 

FrameXX

Well-known member
Latest bit of help on one of my questions. Answers 1 & 2 look workable, though not what I had in mind. Is 3 true?! I haven't checked carefully, but it seems to me configuring that action would show no such option.

ChatGPT wrote:

There are a few ways for two macros to pass local variable values to each other without using global variables or webhooks. Here are a few possibilities:

1. Use the MacroDroid clipboard action to store the value of a local variable in one macro, and then read that value from the clipboard in the other macro. You can use the Set Clipboard action to set the clipboard to the value of a local variable, and then use the Clipboard Contents condition to read the value from the clipboard in the other macro.

2. Use a file on the device to store the value of a local variable in one macro, and then read that value from the file in the other macro. You can use the Write File action to write the value of a local variable to a file, and then use the File Exists condition to check for the existence of the file and the Read File action to read the value from the file in the other macro.

3. Use the Run Macro action to run one macro from the other, passing the value of a local variable as a parameter. You can use the Run Macro action to run one macro from the other and pass the value of a local variable as a parameter. In the receiving macro, you can use the %par1, %par2, etc. variables to access the values of the parameters passed to the macro.

These are just a few examples of ways to pass local variable values between macros. The specific approach you choose may depend on the nature of the variables you need to pass and the specific requirements of your macros.

It makes things up especially if it doesn't know much about the topic. That's a standard and expected behavior of ChatGPT 3.5.
 
Top