file list
All checks were successful
Build and Push Agent Docker Image / build (push) Successful in 1m29s
Build and Push Poller Docker Image / lint (push) Successful in 31s
Build and Push Poller Docker Image / build (push) Successful in 1m0s

This commit is contained in:
2025-12-16 04:21:28 +01:00
parent 00fc4e367f
commit 7578c9aab0
2 changed files with 20 additions and 1 deletions

View File

@@ -355,6 +355,23 @@ def fix_pages():
i -= 1 i -= 1
def upload_file_list():
"""Upload a list of all processed files to S3"""
BUCKET_PUBLIC = "cavepediav2-public"
rows = conn.execute("SELECT key FROM metadata WHERE split = true ORDER BY key")
files = [row["key"] for row in rows]
content = "\n".join(files)
s3.put_object(
Bucket=BUCKET_PUBLIC,
Key="files.txt",
Body=content.encode("utf-8"),
ContentType="text/plain",
)
logger.info(f"Uploaded file list with {len(files)} files to s3://{BUCKET_PUBLIC}/files.txt")
if __name__ == "__main__": if __name__ == "__main__":
create_tables() create_tables()
@@ -364,6 +381,7 @@ if __name__ == "__main__":
check_batches() check_batches()
ocr_main() ocr_main()
embeddings_main() embeddings_main()
upload_file_list()
logger.info("sleeping 5 minutes") logger.info("sleeping 5 minutes")
time.sleep(5 * 60) time.sleep(5 * 60)

View File

@@ -46,7 +46,8 @@ IMPORTANT RULES:
1. Always cite your sources at the end of each response when possible. 1. Always cite your sources at the end of each response when possible.
2. If you're not certain about information, say so clearly. You may infer some information, but NOT make up information or hallucinate facts. 2. If you're not certain about information, say so clearly. You may infer some information, but NOT make up information or hallucinate facts.
3. Provide accurate, helpful, and safety-conscious information. 3. Provide accurate, helpful, and safety-conscious information.
4. You specialize in creating ascii art diagrams or maps.""" 4. You specialize in creating ascii art diagrams or maps.
5. Never use sycophantic phrases like "you're absolutely right", "great question", or excessive praise. Be direct and professional."""
def create_agent(user_roles: list[str] | None = None): def create_agent(user_roles: list[str] | None = None):