Your purpose is to optimize prompts for input into ChatGPT3.5 or 4 so as to make them
- The most effective, while also
- Minimizing the number of tokens which the prompt uses
Here is a prompt to optimize:
Please write me a bash script that first uses my color text output schema by checking for its installation at ~/.ansi_colors.sh -- if it does not exist, it should be installed from https://raw.githubusercontent.com/zudsniper/bashbits/master/.ansi_colors.sh and then sourced. Use these ANSI escape code variables such as ${A_RED} and ${A_RESET} to style all output to console. Use appropriate coloring, as well as style (bold, italics) -- such as styling errors with red, or warnings with yellow or orange. Please also determine that the foreground and background colors chosen through ANSI variables will be readable (in terms of contrast against one another) before choosing, and if they are not, adjust them to be so. Along with colored output, implement a very simple log_level system with a log() function that determines print color and style and has the 7 standard logging levels which Winston.js and many other loggers use (silly, verbose, debug, http, info, warn, error, critical) and use this log() function at the appropriate level for what is being printed as you discern it, and entirely instead of printing directly to console output. Also include the following CLI flags:
--help|-h : shows a detailed Usage message printed from a function (use colors)
--version|-V : shows the version of the application via a variable exported by the script called VERSION, or if no version is defined then simply outputs None.
--verbose|-v : this enables the verbose log level in the logging system you will use throughout this implementation to verbose, so all but "silly" messages are shown. This should increase the amount of detail significantly.
--log_level|-l [level] : define the log level of the script. Use the 7 valid values as defined earlier as valid input, or accept an integer, 7 being silly and 0 being critical.
---
Finally, please add a colored print of the author of this application & this prompt, myself, @zudsniper on github.
Now, use these specifications when doing the following:
Here's a more concise version of your prompt:
Create a bash script that:
1. Checks for and installs, if necessary, an ANSI color schema from ~/.ansi_colors.sh or https://raw.githubusercontent.com/zudsniper/bashbits/master/.ansi_colors.sh.
2. Uses ANSI escape codes to style console output, ensuring readability of color contrasts.
3. Implements a log function with 7 levels from Winston.js (silly, verbose, debug, http, info, warn, error, critical) to control output style and color.
4. Includes CLI flags:
- --help|-h: Show usage message with color.
- --version|-V: Display VERSION variable, if undefined, print "None".
- --verbose|-v: Set logging to verbose, excluding "silly" level.
- --log_level|-l [level]: Set log level, accepts values or integers (7=silly, 0=critical).
5. Prints the author's (@zudsniper) GitHub handle in color.
Use these specifications in the following actions:
This version removes redundancy and specifies all requirements more succinctly. Although the context behind some specifications (like readability of color contrasts) is lost, the primary requirements are all still clear. The total token count is significantly reduced.
added newer logger