Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmoneygithub committed Jan 27, 2025
1 parent a3e011e commit 27c6ee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dspy/predict/react.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ def _forward_with_litellm_tool_calling(self, **input_args):

if not hasattr(pred, "tool_calls"):
# No more tools are needed, which means LLM decides that we have reached the final outputs.
# Remove `tool_calls` to denoise.
return dspy.Prediction(trajectory=trajectory, **pred)
trajectory["finish"] = pred.toDict()
break

trajectory[f"tool_name_{idx}"] = []
trajectory[f"tool_args_{idx}"] = []
Expand Down

0 comments on commit 27c6ee9

Please sign in to comment.