File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ trait HandleTools
3333 /**
3434 * Global max tries for all tools.
3535 */
36- protected int $ tollMaxTries = 5 ;
36+ protected int $ toolMaxTries = 5 ;
3737
3838 /**
3939 * @var array<string, int>
@@ -42,7 +42,7 @@ trait HandleTools
4242
4343 public function toolMaxTries (int $ tries ): Agent
4444 {
45- $ this ->tollMaxTries = $ tries ;
45+ $ this ->toolMaxTries = $ tries ;
4646 return $ this ;
4747 }
4848
@@ -180,7 +180,7 @@ protected function executeSingleTool(ToolInterface $tool): void
180180 $ this ->toolAttempts [$ tool ->getName ()] = ($ this ->toolAttempts [$ tool ->getName ()] ?? 0 ) + 1 ;
181181
182182 // Single tool max tries have the highest priority on the global max tries.
183- $ maxTries = $ tool ->getMaxTries () ?? $ this ->tollMaxTries ;
183+ $ maxTries = $ tool ->getMaxTries () ?? $ this ->toolMaxTries ;
184184 if ($ this ->toolAttempts [$ tool ->getName ()] > $ maxTries ) {
185185 throw new ToolMaxTriesException ("Tool {$ tool ->getName ()} has been attempted too many times: {$ maxTries } attempts. " );
186186 }
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ protected function executeTools(ToolCallMessage $toolCallMessage): ToolCallResul
4848 $ this ->toolAttempts [$ tool ->getName ()] = ($ this ->toolAttempts [$ tool ->getName ()] ?? 0 ) + 1 ;
4949
5050 // Single tool max tries have the highest priority over the global max tries
51- $ maxTries = $ tool ->getMaxTries () ?? $ this ->tollMaxTries ;
51+ $ maxTries = $ tool ->getMaxTries () ?? $ this ->toolMaxTries ;
5252 if ($ this ->toolAttempts [$ tool ->getName ()] > $ maxTries ) {
5353 throw new ToolMaxTriesException ("Tool {$ tool ->getName ()} has been attempted too many times: {$ maxTries } attempts. " );
5454 }
You can’t perform that action at this time.
0 commit comments