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

feat: Optionally specify a max cost that will halt exchange once breached #225

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jsibbison-square
Copy link
Collaborator

When creating autonomous use cases I often know a somewhat statistical upper bound where if a certain number of tokens/cost have been used then it will probably never solve the problem given to it. Most likely it is looping in some way.

To avoid blowing out costs this PR allows us to specify a --max-cost option on the cli that once the exchange has received an output from the LLM and the cost is exceeded then no further information will be sent to the LLM, the session will pause and the user will see a message.

Screenshot 2024-11-07 at 9 18 55 pm

By allowing us to short-circuit wayward sessions it opens up the option to have 'spend budgets' where we are willing to pay a certain amount to try to solve a problem. Then if the first approach fails we can try alternative approaches/prompts in a programatic way all within a budget which can increase the chance of success and protect ROI.

@jsibbison-square jsibbison-square marked this pull request as ready for review November 7, 2024 11:55
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems pretty reasonable to me

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

Successfully merging this pull request may close these issues.

2 participants