From a41ced13459d67122604ccdb170779f50fc841a8 Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Thu, 4 Sep 2025 15:45:30 +0800 Subject: [PATCH] fix: the search content return tuple issue (#555) --- src/graph/nodes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graph/nodes.py b/src/graph/nodes.py index 14080aa..12dc9bf 100644 --- a/src/graph/nodes.py +++ b/src/graph/nodes.py @@ -53,6 +53,9 @@ def background_investigation_node(state: State, config: RunnableConfig): searched_content = LoggedTavilySearch( max_results=configurable.max_search_results ).invoke(query) + # check if the searched_content is a tuple, then we need to unpack it + if isinstance(searched_content, tuple): + searched_content = searched_content[0] if isinstance(searched_content, list): background_investigation_results = [ f"## {elem['title']}\n\n{elem['content']}" for elem in searched_content