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

fix: Add discord summary type! #55

Merged
merged 1 commit into from
Feb 12, 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
16 changes: 6 additions & 10 deletions dags/hivemind_etl_helpers/src/db/discord/summary/summary_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def transform_thread_summary_to_document(
"date": summary_date,
"thread": thread_name,
"channel": thread_channel,
"type": "thread",
},
excluded_embed_metadata_keys=["date", "thread", "channel"],
excluded_embed_metadata_keys=["date", "thread", "channel", "type"],
)

return thread_summary_document
Expand Down Expand Up @@ -65,11 +66,8 @@ def transform_channel_summary_to_document(

channel_summary_document = Document(
text=channel_summary,
metadata={
"date": summary_date,
"channel": channel_name,
},
excluded_embed_metadata_keys=["date", "thread", "channel"],
metadata={"date": summary_date, "channel": channel_name, "type": "channel"},
excluded_embed_metadata_keys=["date", "thread", "channel", "type"],
)

return channel_summary_document
Expand Down Expand Up @@ -99,10 +97,8 @@ def transform_daily_summary_to_document(
summary = daily_summary[date]
doc = Document(
text=summary,
metadata={
"date": date,
},
excluded_embed_metadata_keys=["date", "thread", "channel"],
metadata={"date": date, "type": "day"},
excluded_embed_metadata_keys=["date", "thread", "channel", "type"],
)
daily_summary_documents.append(doc)

Expand Down
Loading