Commit 63f7e92
fix(ReActAgent): allow tool calls to reach acting phase for proper error feedback(#850)
…ror feedback
When model generates tool calls that don't exist in toolkit, the
isFinished() method was prematurely terminating the ReAct loop,
preventing the model from receiving error feedback.
Now tool calls (even non-existent ones) proceed to the acting phase
where ToolExecutor returns 'Tool not found' error. This allows the model
to see the error in memory and self-correct in the next iteration.
Simplified isFinished() to only check if there are tool calls, removing
the toolkit existence check since error handling is already properly
implemented in ToolExecutor.executeCore().
## AgentScope-Java Version
[The version of AgentScope-Java you are working on, e.g. 1.0.9, check
your pom.xml dependency version or run `mvn dependency:tree | grep
agentscope-parent:pom`(only mac/linux)]
## Description
[Please describe the background, purpose, changes made, and how to test
this PR]
## Checklist
Please check the following items before code is ready to be reviewed.
- [x] Code has been formatted with `mvn spotless:apply`
- [x] All tests are passing (`mvn test`)
- [x] Javadoc comments are complete and follow project conventions
- [x] Related documentation has been updated (e.g. links, examples,
etc.)
- [x] Code is ready for review
Co-authored-by: LearningGp <learninggp4.74@gmail.com>1 parent 84f1354 commit 63f7e92
1 file changed
Lines changed: 3 additions & 6 deletions
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
759 | 756 | | |
760 | 757 | | |
761 | 758 | | |
| |||
0 commit comments