feat(helm): add Helm chart for Kubernetes deployment and update DeploymentGuide
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -200,8 +200,8 @@ def embed_metadata_into_pdf(self, local_file_path: str, extracted_text: str, met
|
||||
if metadata:
|
||||
try:
|
||||
file_record.ai_metadata = json.dumps(metadata, ensure_ascii=False)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as json_exc:
|
||||
logger.warning(f"[{task_id}] Could not serialise ai_metadata: {json_exc}")
|
||||
file_record.document_title = (
|
||||
metadata.get("title") or metadata.get("filename") or file_record.original_filename
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ Generation) workflows by storing full document text alongside structured
|
||||
metadata fields.
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
from typing import Any, Optional
|
||||
|
||||
@@ -112,7 +111,6 @@ def _get_or_create_index(client):
|
||||
|
||||
def _build_document(file_record, text: str, metadata: dict) -> dict:
|
||||
"""Build a Meilisearch document from a FileRecord and extracted content."""
|
||||
import json as _json
|
||||
|
||||
tags = metadata.get("tags", [])
|
||||
if isinstance(tags, str):
|
||||
@@ -123,8 +121,8 @@ def _build_document(file_record, text: str, metadata: dict) -> dict:
|
||||
if file_record.created_at:
|
||||
try:
|
||||
created_at_ts = int(file_record.created_at.timestamp())
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as ts_exc: # noqa: BLE001
|
||||
logger.debug(f"Could not convert created_at to timestamp: {ts_exc}")
|
||||
|
||||
return {
|
||||
"file_id": file_record.id,
|
||||
@@ -229,7 +227,6 @@ def search_documents(
|
||||
return empty
|
||||
|
||||
try:
|
||||
from app.config import settings
|
||||
|
||||
index = _get_or_create_index(client)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user