Skip to content

Commit

Permalink
Merge pull request #319 from TogetherCrew/feat/313-telegram-summarizer
Browse files Browse the repository at this point in the history
feat: saving datetime instead of date for Qdrant db!
  • Loading branch information
amindadgar authored Nov 6, 2024
2 parents bef38dd + 08c52dd commit 74bc2a9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import date, timedelta
from datetime import date, datetime, timedelta, timezone

from llama_index.core import Document

Expand Down Expand Up @@ -32,7 +32,9 @@ def transform(self, summaries: dict[date, str]) -> list[Document]:
+ (day + timedelta(days=1)).strftime("%Y-%m-%d"),
text=summary,
metadata={
"date": day,
"date": datetime.combine(
day, datetime.min.time(), tzinfo=timezone.utc
),
},
)
summary_docs.append(document)
Expand Down

0 comments on commit 74bc2a9

Please sign in to comment.