Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to suppress stdout to save tokens on User: prompt - enhancement request #44

Open
nslieske opened this issue Nov 18, 2023 · 2 comments
Labels

Comments

@nslieske
Copy link

nslieske commented Nov 18, 2023

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

@nslieske
Copy link
Author

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)  

@ErikBjare
Copy link
Owner

ErikBjare commented Jan 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants