diff --git a/openviking/utils/embedding_utils.py b/openviking/utils/embedding_utils.py index cf442cc0a..54a7ba985 100644 --- a/openviking/utils/embedding_utils.py +++ b/openviking/utils/embedding_utils.py @@ -282,6 +282,8 @@ def _truncate_text(value: str) -> str: if isinstance(content, bytes): content = content.decode("utf-8", errors="replace") content = _truncate_text(content) + if not context.abstract and content: + context.abstract = content[:200] context.set_vectorize(Vectorize(text=content)) except Exception as e: logger.warning(