gptme
gptme copied to clipboard
option to suppress stdout to save tokens on User: prompt - enhancement request
When you know you are going to produce a bunch of stdout that you do not want Assistant to analyze, make an optional way to suppress the stdout, so we save tokens. I'm burning through tokens like mad.
/shell -q or :-q if we get the : feature or /s -q if we get the /s short cut
Thinking about this, another conditional flag that would be nice to have as an option to force execution of code (Y) if you are sure it's safe to execute.
In a case like this, maybe: -y ok, let's update the system
User: ok, let's update the system INFO:gptme.tools.reduce:Log exceeded limit of 115200.0, was 488085, reducing INFO:gptme.tools.reduce:Log exceeded limit of 115200.0, was 172407, reducing INFO:gptme.logmanager:Reduced log from 488085 to 97571 tokens Assistant: To update the system, you typically need to refresh the package lists and then upgrade the packages. If you're using a Debian-based system like Ubuntu, you can use the following commands:
sudo apt update
sudo apt upgrade
``
Preview
$ sudo apt update
sudo apt upgrade
⚠️ Execute code? (Y/n)
I think these are good ideas, and could easily be added (and would get merged).
But right now I'm personally focusing on better general ways to handle context size, see #59.
Trying to find the time to implement such ideas.