Autosuggest is a feature that suggests command completions as you type, based on the context of your previous commands and the current prompt. This can save time by reducing typing errors and speeding up workflows. However, because autosuggest involves sending each keystroke to an LLM for completion suggestions, it can be expensive if you have a limited number of OpenAI credits or are using a paid subscription. To reduce costs, Butterfish Shell provides options to disable autosuggest (-A) and increase the autosuggest timeout (e.g. -t 2000). The default autosuggest model is text-davinci-003, but you can change it using the –autosuggest-model flag. If you’re not sure whether to use autosuggest or not, try running Butterfish Shell with and without it enabled to see which workflow suits your needs best.
In terms of cost savings, disabling autosuggest (-A) will completely turn off this feature, while increasing the timeout value (e.g. -t 2000) can help reduce the number of calls made to OpenAI’s LLM for completion suggestions. This is because a longer timeout means that Butterfish Shell waits longer before sending each keystroke to the LLM, which in turn reduces the overall number of requests sent and therefore lowers costs.
However, it should be noted that disabling autosuggest can also have drawbacks depending on your workflow needs. For example, if you frequently use complex commands or are working with a large codebase, autosuggest can help save time by suggesting completion options as you type. In contrast, disabling autosuggest may require more typing and potentially increase the risk of errors due to typos or forgotten syntax.
Ultimately, whether or not to use autosuggest is a matter of personal preference and workflow needs. If cost savings are your primary concern, then disabling autosuggest (-A) or increasing the timeout value (e.g. -t 2000) may be worth considering. However, if you rely heavily on complex commands or frequently use a large codebase, then keeping autosuggest enabled may provide significant time savings and help reduce errors due to typos or forgotten syntax.