Skip to content

Commit 2429400

Browse files
committed
chore(consolidate): ignore tool result to reduce the token used in consolidate
1 parent d866881 commit 2429400

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

AgentCrew/modules/chat/consolidation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ def format_conversation_for_summary(self, messages: List[Dict[str, Any]]) -> str
147147
prefix = "USER: "
148148
elif role == "assistant":
149149
prefix = f"{agent_name.upper()}: "
150-
elif role == "tool":
151-
prefix = f"TOOL ({msg.get('name', 'unknown')}): "
150+
# Skip the tool data for saving tokens in summary
151+
# elif role == "tool":
152+
# prefix = f"TOOL ({msg.get('name', 'unknown')}): "
152153
elif role == "consolidated":
153154
# If we're summarizing a section that already has a consolidated message,
154155
# include it directly to preserve that context

0 commit comments

Comments
 (0)