intermediate_response_options + intermediate_listable #551
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description (Dev r1 #551)
Overview
This PR merges the
dev-r1
branch intomain
, providing new iterative ReAct flow features, improved intermediate response logic, and additionalreasoning_effort
parameterization. The largest change set is in theReAct.py
flow, offering a more flexible iterative pipeline with partial intermediate outputs. It also expands the system’s ability to handle streaming or partial sequences of ReAct calls.Key Changes
Refined
ReAct
FlowReActStream
function that yields partial analysis objects step-by-step.ReAct
:reasoning_effort="low"|"medium"|"high"
influences how thoroughly the model reasons.intermediate_response_options
+intermediate_listable
let you define multiple partial outputs.display_as="json"|"yaml"
toggles final display formatting.Branch-level Orchestration
Branch.ReAct
calls the updated underlyingReActStream
for a multi-round approach.Branch.ReActStream
yields partial analysis ifverbose=True
, printing results as the chain unfolds.format_curly
todisplay_as
display_as
param, making it more consistent across functions.Version Bump to
0.9.1
0.9.0
to0.9.1
inpyproject.toml
andlionagi/version.py
.Notebook & Example Updates
notebooks/react.ipynb
includes demonstration for the newly introduced streaming usage and partial iteration.Files Changed
lionagi/operations/ReAct/ReAct.py
:+650
lines) introducing multi-round streaming logic, partial intermediate responses, and a new parameter set for advanced control.lionagi/session/branch.py
:ReActStream
method referencing the new ReAct approach.reasoning_effort
,intermediate_response_options
).Various:
format_curly
now replaced withdisplay_as="yaml"
or"json"
.lionagi/version.py
andpyproject.toml
to0.9.1
.Testing & Validation
notebooks/react.ipynb
) updated to demonstrate the new streaming approach.We appreciate any feedback to further refine partial iteration flows for ReAct. Please review changes for any integration conflicts or synergy with your existing code. We look forward to your comments!