Spaces:
Sleeping
Sleeping
| def llm_node(question, search_result): | |
| # Check if search_result is a list of dicts | |
| if isinstance(search_result, list): | |
| combined_result = " ".join( | |
| item.get("content", "") for item in search_result if isinstance(item, dict) | |
| ) | |
| else: | |
| combined_result = str(search_result) | |
| combined_answer = combined_result.strip() | |
| return combined_answer | |