OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Tools for limiting tokens/requests to LLMs

Open rbren opened this issue 1 year ago • 4 comments

What problem or use case are you trying to solve? It's easy to put OpenDevin into a loop, causing it to potentially incur huge costs from the LLM provider.

We should at least expose max_iterations. Maybe max_tokens_per_request too

Describe the UX of the solution you'd like Probably a settings modal?

Do you have thoughts on the technical implementation? Will need to ingest this in session.py, then pass it to the controller

rbren avatar Mar 31 '24 14:03 rbren

Where do we use max_tokens_per_request? It seems I didn't find it in our codebase.

yufansong avatar Apr 02 '24 11:04 yufansong

There's no max_tokens_per_request yet! Would be great to have

Probably needs to be max_chars_per_request though since tokenization happens on the LLM-side

rbren avatar Apr 02 '24 12:04 rbren

It's easy to put OpenDevin into a loop, causing it to potentially incur huge costs from the LLM provider.

Agree. This is my first impression of OpenDevin XD. My first use of OpenDevin led to an infinite loop that I had to manually kill.

li-boxuan avatar Apr 10 '24 06:04 li-boxuan

I am working on max_chars_per_request as my hopefully first contribution to opendevin.

li-boxuan avatar Apr 10 '24 06:04 li-boxuan