|
8 | 8 | ```sh |
9 | 9 | gpt_cmd "Install python3 and pip3 and symlink them to python and pip" |
10 | 10 |
|
11 | | -gpt_cmd "You're running in a container that already has wget and bash installed. Install kafka" |
12 | | - |
13 | 11 | gpt_cmd "Install SQLite and write a script to verify it's working correctly" |
14 | 12 |
|
15 | 13 | gpt_cmd "Install black and generate a simple starter config file for my python project" |
16 | 14 | ``` |
17 | 15 |
|
18 | | -### Problem |
19 | | - |
20 | | -> I'm working on a fresh Docker image, and I can't remember the specific commands needed to install tools. I can ask ChatGPT, but it might give me an answer that doesn't work with the exact environment I'm running in (e.g. differences between linux distros). Why can't ChatGPT just figure all that out for me? |
21 | | -
|
22 | | -The main problem is that, a lot of the time, to determine what exactly needs to be run (e.g. to install kafka in a Docker image), you need to try running commands to see if they fail, or run commands to probe the system to determine what tools are available. |
23 | | - |
24 | | -For example, sometimes `sudo` doesn't exist in Docker, and since it runs as the root user by default, you can just leave it out. ChatGPT has no problem deducing that it can just remove the `sudo` in those cases. |
25 | | - |
26 | | -### Solution |
27 | | - |
28 | | -Let ChatGPT iteratively run commands for you to achieve your end goal. |
| 16 | +`gpt_cmd` lets ChatGPT iteratively run commands for you to achieve your end goal. |
29 | 17 |
|
30 | | -The way it works is that you provide some end goal (e.g. 'Install python3 and pip3'), and ChatGPT will respond with a list of commands it wants to run. The tool will execute these commands and respond to ChatGPT with the stdout and exit code of each. Once ChatGPT thinks it's done, it'll respond accordingly and the loop will end. |
| 18 | +The way it works is that you provide some end goal (e.g. 'Install python3 and pip3'), the tool will bake-in information about your OS and architecture, and ChatGPT will respond with a list of commands it wants to run. The tool will execute these commands and respond to ChatGPT with the stdout and exit code of each. Once ChatGPT thinks it's done, it'll respond accordingly and the loop will end (and it'll usually provide a bit of context about what it did). |
31 | 19 |
|
32 | | -With this approach, ChatGPT is able to probe your system and try running commands, responding to potential failures as they happen with alternative commands. |
| 20 | +With this approach, ChatGPT is able to probe your system and try running commands, responding to potential failures as they happen with alternative commands. It's especially handy for tasks that aren't all that complex, but you can't be bothered to google exactly what you need to run. |
33 | 21 |
|
34 | 22 | ## Install |
35 | 23 |
|
|
0 commit comments