DAGWorks-Inc / burr

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
https://burr.dagworks.io
BSD 3-Clause Clear License
1.28k stars 71 forks source link

Add override state value field to `initialize_from` #416

Open skrawcz opened 2 weeks ago

skrawcz commented 2 weeks ago

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:

values_i_want_to_override = {"key": "value"} 

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

For the UI:

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.