mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-10 04:37:24 -04:00
debug: add logging to verify conversation history capture
Added debug output to confirm: - How many messages are in conversation_history - How many assistant vs tool messages - Preview of first assistant message content - What the summarizer receives This will verify that the full detailed reasoning (like portfolio analysis, trade execution details) is being captured and passed to the summarizer. Output will show: [DEBUG] Generating summary from N messages [DEBUG] Assistant messages: X, Tool messages: Y [DEBUG] First assistant message preview: ... [DEBUG ReasoningSummarizer] Formatting N messages [DEBUG ReasoningSummarizer] Breakdown: X assistant, Y tool
This commit is contained in:
@@ -71,6 +71,12 @@ Provide a concise summary that includes the actual trades executed:"""
|
||||
Returns:
|
||||
Formatted text representation with emphasis on trades
|
||||
"""
|
||||
# Debug: Log what we're formatting
|
||||
print(f"[DEBUG ReasoningSummarizer] Formatting {len(reasoning_log)} messages")
|
||||
assistant_count = sum(1 for m in reasoning_log if m.get('role') == 'assistant')
|
||||
tool_count = sum(1 for m in reasoning_log if m.get('role') == 'tool')
|
||||
print(f"[DEBUG ReasoningSummarizer] Breakdown: {assistant_count} assistant, {tool_count} tool")
|
||||
|
||||
formatted_parts = []
|
||||
trades_executed = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user