Skip to content

Commit 43d79fa

Browse files
committed
set toolExecutionMaxIterations default value is 3
Signed-off-by: lambochen <[email protected]>
1 parent 370f0a3 commit 43d79fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spring-ai-model/src/main/java/org/springframework/ai/model/tool/ToolCallingChatOptions.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public interface ToolCallingChatOptions extends ChatOptions {
4949
*/
5050
int TOOL_EXECUTION_NO_LIMIT = Integer.MAX_VALUE;
5151

52-
int DEFAULT_TOOL_EXECUTION_MAX_ITERATIONS = TOOL_EXECUTION_NO_LIMIT;
52+
/**
53+
* Default maximum number of tool execution iterations.
54+
* ref: Three strikes and you are out!
55+
*/
56+
int DEFAULT_TOOL_EXECUTION_MAX_ITERATIONS = 3;
5357

5458
/**
5559
* ToolCallbacks to be registered with the ChatModel.

0 commit comments

Comments
 (0)