Umer797 commited on
Commit
945355d
·
verified ·
1 Parent(s): 2067fe1

Update llm_node.py

Browse files
Files changed (1) hide show
  1. llm_node.py +4 -2
llm_node.py CHANGED
@@ -1,7 +1,9 @@
1
  def llm_node(question, search_result):
2
- # Make sure search_result is a string
3
  if isinstance(search_result, list):
4
- combined_result = " ".join(search_result)
 
 
5
  else:
6
  combined_result = str(search_result)
7
 
 
1
  def llm_node(question, search_result):
2
+ # Check if search_result is a list of dicts
3
  if isinstance(search_result, list):
4
+ combined_result = " ".join(
5
+ item.get("content", "") for item in search_result if isinstance(item, dict)
6
+ )
7
  else:
8
  combined_result = str(search_result)
9