OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Setting for API key in the UI

Open rbren opened this issue 1 year ago • 4 comments

What problem or use case are you trying to solve? Let the user paste their API key into the UI

Describe the UX of the solution you'd like A password box in the settings modal.

It should be saved in local storage, and associated with the selected model.

If the user changes to a new model, we should clear the API key input, but persist the old API key in localstorage

Open question: how do we note that some models use the same API key (e.g. gpt-4 and gpt-3.5)? Should we just have one key for now?

Do you have thoughts on the technical implementation? The API key should be sent via the initialize event, and will need to be used when constructing an LLM object.

rbren avatar Apr 15 '24 23:04 rbren

I think the GUI should also prevent users from modifying API key when a task is executing.

li-boxuan avatar Apr 16 '24 02:04 li-boxuan

@li-boxuan that does sound reasonable! Honestly all settings should probably be frozen while a task is in progress

rbren avatar Apr 17 '24 16:04 rbren

Being frozen is quite necessary. I may prefer that people first finish the setup first, and then run the whole task (now it seems that everything is still a single turn). We may have some reset button, then users can setup the key and model for the next task.

Now there is another pain is that the key is actually highly correlated with the model. Do we need to have some check to make the key and the model work first before entering the task?

JustinLin610 avatar Apr 23 '24 04:04 JustinLin610

@li-boxuan that does sound reasonable! Honestly all settings should probably be frozen while a task is in progress

Implemented in https://github.com/OpenDevin/OpenDevin/pull/1291

Sparkier avatar Apr 23 '24 20:04 Sparkier