diff --git a/apps/scheduler/scheduler/message.py b/apps/scheduler/scheduler/message.py index 3c85a4e6993111438616a00e80a901747b7cc58d..2bd18861789ae2c5f8a909a4831a2fe967045c12 100644 --- a/apps/scheduler/scheduler/message.py +++ b/apps/scheduler/scheduler/message.py @@ -125,7 +125,7 @@ async def _push_rag_chunk(task: Task, queue: MessageQueue, content: str) -> tupl documentAbstract=content_obj.content.get("abstract", ""), documentType=content_obj.content.get("extension", ""), documentSize=content_obj.content.get("size", 0), - createdAt=round(datetime.now(tz=UTC).timestamp(), 3), + createdAt=round(content_obj.content.get("created_at", datetime.now(tz=UTC).timestamp()), 3), ).model_dump(exclude_none=True, by_alias=True), ) except Exception: diff --git a/apps/services/rag.py b/apps/services/rag.py index af3b3e5363228c89c16baad6076d20ac6913fd5b..918962498bf7727dba5e62769c813c4bdb2bf456 100644 --- a/apps/services/rag.py +++ b/apps/services/rag.py @@ -312,8 +312,9 @@ class RAG: + "\n\n" ) max_footnote_length = 4 - while doc_cnt > 0: - doc_cnt //= 10 + tmp_doc_cnt = doc_cnt + while tmp_doc_cnt > 0: + tmp_doc_cnt //= 10 max_footnote_length += 1 buffer = "" async for chunk in reasion_llm.call(