From 179b848ecbd98cc5e68892535b6a7076a02cd03e Mon Sep 17 00:00:00 2001 From: Christopher Gondek Date: Wed, 8 Oct 2025 17:22:07 +0200 Subject: [PATCH] fix: hide tool calls from chatbot history --- modules/features/chatBot/service.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/features/chatBot/service.py b/modules/features/chatBot/service.py index 9cbb3ccf..510018c3 100644 --- a/modules/features/chatBot/service.py +++ b/modules/features/chatBot/service.py @@ -561,13 +561,14 @@ async def get_thread_messages_from_langgraph( if msg.type not in ["human", "ai"]: continue - # Convert content to string if needed - content = msg.content if isinstance(msg.content, str) else str(msg.content) + # Skip messages with non-string content (e.g., tool calls) + if not isinstance(msg.content, str): + continue messages.append( { "role": ROLE_MAP.get(msg.type, msg.type), - "content": content, + "content": msg.content, } )