breadboard-ai / breadboard

A library for prototyping generative AI applications.
Apache License 2.0
184 stars 25 forks source link

Aborting a board run loses values #3645

Open surma opened 3 days ago

surma commented 3 days ago

It's really nice that the "Run Board" mechanism maintains values from previous runs for the input fields. However, if halfway through filling out the prompts I realize I forgot to draw an edge and go ahead and fix that, it seems that all input values are wiped. It might be nicer to retain the values from the last successful run.

paullewis commented 3 days ago

They shouldn't be wiped. We retain the last run in memory, and use it to populate input values for the current run. The run values are stored as each component is visited, so they should be available even if you stop a run. Do you have a board I can take a look at which is misbehaving?

surma commented 3 days ago

For me, it loses all values from the current prompt and later prompts if I abort the editing process.

Example board here: https://breadboard.live/boards/@surma/openai-request.bgl.json

paullewis commented 3 days ago

Do you abort the editing before continuing? If so that would explain it as we only store the value once the component has "exited".

paullewis commented 3 days ago

(I've been trying the board on my end but it's recalling values for me 🤔)

surma commented 3 days ago

It seems something as simple as moving a node loses values.

Here's a video

paullewis commented 3 days ago

That's super odd. Paging @dglazkov who might have some additional ideas...