From 0b58472ab1621da901c23155b993935beedf5d34 Mon Sep 17 00:00:00 2001 From: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:25:11 -0400 Subject: [PATCH] chore: Coderabbit Nitpicks --- .env.template | 6 +++--- config.toml.example | 2 +- src/deriver/consumer.py | 2 +- src/deriver/deriver.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.template b/.env.template index 9c82815d..9cc57de0 100644 --- a/.env.template +++ b/.env.template @@ -10,8 +10,8 @@ LOG_LEVEL=INFO # SESSION_OBSERVERS_LIMIT=10 # GET_CONTEXT_MAX_TOKENS=100000 -# MAX_FILE_SIZE=5242880 -# MAX_MESSAGE_SIZE=25000 +# MAX_FILE_SIZE=5242880 # Bytes +# MAX_MESSAGE_SIZE=25000 # Characters # Embedding settings # EMBED_MESSAGES=true @@ -133,4 +133,4 @@ LLM_ANTHROPIC_API_KEY=your-anthropic-api-key-here # SENTRY_RELEASE=your-release-semver # SENTRY_ENVIRONMENT=development # SENTRY_TRACES_SAMPLE_RATE=0.1 -# SENTRY_PROFILES_SAMPLE_RATE=0.1 \ No newline at end of file +# SENTRY_PROFILES_SAMPLE_RATE=0.1 diff --git a/config.toml.example b/config.toml.example index 982f3561..3be89786 100644 --- a/config.toml.example +++ b/config.toml.example @@ -9,7 +9,7 @@ LOG_LEVEL = "INFO" SESSION_OBSERVERS_LIMIT = 10 GET_CONTEXT_MAX_TOKENS = 100000 MAX_FILE_SIZE = 5242880 # 5MB -MAX_MESSAGE_SIZE = 25000 +MAX_MESSAGE_SIZE = 25000 # Characters EMBED_MESSAGES = true MAX_EMBEDDING_TOKENS = 8192 MAX_EMBEDDING_TOKENS_PER_REQUEST = 300000 diff --git a/src/deriver/consumer.py b/src/deriver/consumer.py index 924eb033..a6796752 100644 --- a/src/deriver/consumer.py +++ b/src/deriver/consumer.py @@ -33,7 +33,7 @@ async def process_items(task_type: str, queue_payloads: list[dict[str, Any]]) -> task type to Pydantic model. After validation, routes the request to the correct processor without repeating type checks elsewhere. """ - if not queue_payloads: + if not queue_payloads or not queue_payloads[0]: logger.debug("process_items received no payloads for task type %s", task_type) return diff --git a/src/deriver/deriver.py b/src/deriver/deriver.py index d51c3e00..f7352dd3 100644 --- a/src/deriver/deriver.py +++ b/src/deriver/deriver.py @@ -109,7 +109,7 @@ async def process_representation_tasks_batch( """ Process a batch of representation tasks by extracting insights and updating working representations. """ - if not payloads: + if not payloads or len(payloads) == 0: return payloads.sort(key=lambda x: x.message_id)