xonecas.io
53129
Pa

PAT / commit 7e8f2bb

fix: reduce the number of tool calls

xonecas2025-12-17 7e8f2bb1f0fa83cd7a903e56fb55c82b39bc0416 parent 5dce873

1 file changed

src/lib/ollama/index.ts+1−1
@@ -99,7 +99,7 @@ export async function fetchOllamaResponse(
9999 role: msg.role,
100100 content: msg.content,
101101 }));
102- const maxIterations = 10; // Prevent infinite loops
102+ const maxIterations = 4; // Prevent infinite loops
103103 let iterations = 0;
104104 const allToolCalls: any[] = []; // Collect all tool calls across iterations