mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: the search content return tuple issue (#555)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user