burr icon indicating copy to clipboard operation
burr copied to clipboard

Add override state value field to `initialize_from`

Open skrawcz opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. When forking from state, we might want to augment the state as part of debugging/forking.

Describe the solution you'd like To be able to modify the starting state when using initialize_from to build the initial state.

Use cases:

  • fix state (e.g. I saw in the state it was bad, let me fix it)
  • turn on other logic via state
  • override values, e.g. change the email, etc.
values_i_want_to_override = {"key": "value"} 

app = (ApplicationBuilder().
    ...
  .initialize_from(
   ..., 
   override_state_values=values_i_want_to_override
  ).build()
)

For the UI:

  • we should call the override out. E.g. via some marker to indicate we forked, but modified state...

Describe alternatives you've considered You can do this today, it just happens outside of the application builder:

  1. manually load state via the persister.
  2. adjust the state as needed
  3. create a graph from that state and that point in the graph

Additional context This just reduces some boilerplate.

skrawcz avatar Nov 04 '24 04:11 skrawcz