feat: improve fallback message when max iterations reached
This commit is contained in:
1 parent
890d7cf853
commit
dbbbecb25c
1 file changed
+3
@@ -243,6 +243,9 @@ class AgentLoop:
|
|||||||
break
|
break
|
||||||
|
|
||||||
if final_content is None:
|
if final_content is None:
|
||||||
|
if iteration >= self.max_iterations:
|
||||||
|
final_content = f"Reached {self.max_iterations} iterations without completion."
|
||||||
|
else:
|
||||||
final_content = "I've completed processing but have no response to give."
|
final_content = "I've completed processing but have no response to give."
|
||||||
|
|
||||||
# Log response preview
|
# Log response preview
|
||||||
|
|||||||
Reference in new issue
Block a user