Spaces:
Sleeping
Sleeping
Update llm_node.py
Browse files- llm_node.py +7 -3
llm_node.py
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
def llm_node(question, search_result):
|
| 2 |
-
#
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
return combined_answer
|
|
|
|
| 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 |
+
|
| 8 |
+
combined_answer = combined_result.strip()
|
| 9 |
return combined_answer
|