From 893bcbc985bf049780f15b3e3cfe51320841bd25 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 18 Jan 2024 19:43:24 +0330 Subject: [PATCH] skip sending the source nodes! --- celery_app/tasks.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 95c651a..49b8428 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -63,21 +63,22 @@ def ask_question_auto_search( # ) logging.info(f"{prefix}Querying the data sources!") # for now we have just the discord platform - response, source_nodes = query_multiple_source( + response, _ = query_multiple_source( query=question, community_id=community_id, discord=True, ) - source_nodes_dict: list[dict[str, Any]] = [] - for node in source_nodes: - node_dict = dict(node) - node_dict.pop("relationships", None) - source_nodes_dict.append(node_dict) + # source_nodes_dict: list[dict[str, Any]] = [] + # for node in source_nodes: + # node_dict = dict(node) + # node_dict.pop("relationships", None) + # source_nodes_dict.append(node_dict) results = { "response": response, - "source_nodes": source_nodes_dict, + # The source of answers is commented for now + # "source_nodes": source_nodes_dict, } response_payload = Payload.DISCORD_BOT.INTERACTION_RESPONSE.Edit(