burr
burr copied to clipboard
Add override state value field to `initialize_from`
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:
- manually load state via the persister.
- adjust the state as needed
- create a graph from that state and that point in the graph
Additional context This just reduces some boilerplate.