Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip sending the source nodes! #16

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions celery_app/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down