Spaces:
Sleeping
Sleeping
Update llm_node.py
Browse files- llm_node.py +4 -2
llm_node.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
def llm_node(question, search_result):
|
| 2 |
-
#
|
| 3 |
if isinstance(search_result, list):
|
| 4 |
-
combined_result = " ".join(
|
|
|
|
|
|
|
| 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 |
|