Currently, we pass custom callbacks at runtime. This allows custom logic to modify arbitrary frontends, like our gradio app in src/tangents/app.py.
When the graph reaches the action node, it populates the ActionArgs with the configurable values. These can be unloaded from the action arg after saving, and in some flows, should have info unnecessary to the LangGraph state.
This concept should be extended to runnables, for instance the LLM as a ChatOpenAI object. This eliminates the need to define it in the task state beforehand.
One option is to define these directly in the LangGraph action_node function. This seems less maintainable, and it seems like a better idea to include it in src/tangents/core/handle_action.py. This will take some testing, but should reduce the bloat in our graph state as well.
Currently, we pass custom callbacks at runtime. This allows custom logic to modify arbitrary frontends, like our gradio app in
src/tangents/app.py.When the graph reaches the action node, it populates the ActionArgs with the configurable values. These can be unloaded from the action arg after saving, and in some flows, should have info unnecessary to the LangGraph state.
This concept should be extended to runnables, for instance the LLM as a ChatOpenAI object. This eliminates the need to define it in the task state beforehand.
One option is to define these directly in the LangGraph action_node function. This seems less maintainable, and it seems like a better idea to include it in
src/tangents/core/handle_action.py. This will take some testing, but should reduce the bloat in our graph state as well.