This commit is contained in:
GH Action - Upstream Sync
2025-08-12 01:43:57 +00:00
5 changed files with 38 additions and 17 deletions

View File

@@ -746,9 +746,13 @@ def attachment_worker(self, file_info, user):
.load_data()[0]
.text,
)
token_count = num_tokens_from_string(content)
if token_count > 100000:
content = content[:250000]
token_count = num_tokens_from_string(content)
self.update_state(
state="PROGRESS", meta={"current": 80, "status": "Storing in database"}
)