File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/praisonai-agents/praisonaiagents/llm Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,7 @@ def get_response(
11201120 else :
11211121 # No tool calls, we're done with this iteration
11221122 # If we've executed tools in previous iterations, this response contains the final answer
1123- if iteration_count > 0 :
1123+ if iteration_count > 0 and not final_response_text :
11241124 final_response_text = response_text .strip () if response_text else ""
11251125 break
11261126
@@ -1869,7 +1869,7 @@ async def get_response_async(
18691869 else :
18701870 # No tool calls, we're done with this iteration
18711871 # If we've executed tools in previous iterations, this response contains the final answer
1872- if iteration_count > 0 :
1872+ if iteration_count > 0 and not final_response_text :
18731873 final_response_text = response_text .strip ()
18741874 break
18751875
You can’t perform that action at this time.
0 commit comments