Skip to content

A programming framework for agentic AI

Fix printout check for num code blocks (#1902)

Jack Gerrits23e49388ca35
diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.py
index aa2af05c6..d6a65eff5 100644
--- a/autogen/agentchat/conversable_agent.py
+++ b/autogen/agentchat/conversable_agent.py
@@ -1273,7 +1273,7 @@ class ConversableAgent(LLMAgent):
continue
num_code_blocks = len(code_blocks)
- if num_code_blocks > 1:
+ if num_code_blocks == 1:
print(
colored(
f"\n>>>>>>>> EXECUTING CODE BLOCK (inferred language is {code_blocks[0].language})...",