Skip to content

Commit

Permalink
Merge pull request #55 from TogetherCrew/fix/hivemind-discord-add-sum…
Browse files Browse the repository at this point in the history
…mary-type

fix: Add discord summary type!
  • Loading branch information
amindadgar authored Feb 12, 2024
2 parents 72b01a5 + 8d820d2 commit 0d348bc
Showing 1 changed file with 6 additions and 10 deletions.
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

0 comments on commit 0d348bc

Please sign in to comment.