Repository navigation
Fix: get_by_id - #16765
Fix: get_by_id#16765
Conversation
📝 WalkthroughWalkthroughThe PR changes SoMark OCR config resolution to call ChangesSoMark Lookup and Formatting Updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16765 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…low into fix/v0.27.0-model-provider
There was a problem hiding this comment.
🧹 Nitpick comments (1)
api/db/joint_services/memory_message_service.py (1)
158-169: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake the optional
task_idexplicit.
task_iddefaults toNone, sostr | Nonematches the runtime contract and clears the Ruff RUF013 warnings on both signatures. Please confirm the repo's Python target supports the union syntax; otherwise useOptional[str].♻️ Proposed fix
- task_id: str = None, + task_id: str | None = None,-async def embed_and_save(memory, message_list: list[dict], task_id: str = None): +async def embed_and_save(memory, message_list: list[dict], task_id: str | None = None):Also applies to: 206-206
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/db/joint_services/memory_message_service.py` around lines 158 - 169, The `extract_by_llm` signature currently marks `task_id` as a plain `str` even though it defaults to `None`, which triggers the Ruff RUF013 warning. Update the type annotation at each affected signature (including the other occurrence noted in the comment) to explicitly allow `None`, and if the project’s Python version does not support `str | None`, use `Optional[str]` instead. Use `extract_by_llm` and the `task_id` parameter as the anchor points when updating the type hints.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@api/db/joint_services/memory_message_service.py`:
- Around line 158-169: The `extract_by_llm` signature currently marks `task_id`
as a plain `str` even though it defaults to `None`, which triggers the Ruff
RUF013 warning. Update the type annotation at each affected signature (including
the other occurrence noted in the comment) to explicitly allow `None`, and if
the project’s Python version does not support `str | None`, use `Optional[str]`
instead. Use `extract_by_llm` and the `task_id` parameter as the anchor points
when updating the type hints.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f74a427b-ec13-426a-b3bc-33c71e7f7061
📒 Files selected for processing (7)
api/db/joint_services/memory_message_service.pyapi/db/joint_services/tenant_model_service.pyrag/app/naive.pyrag/flow/parser/parser.pyrag/nlp/__init__.pyrag/svr/task_executor_refactor/dataflow_service.pyrag/svr/task_executor_refactor/task_handler.py
✅ Files skipped from review due to trivial changes (4)
- rag/svr/task_executor_refactor/task_handler.py
- rag/nlp/init.py
- rag/svr/task_executor_refactor/dataflow_service.py
- api/db/joint_services/tenant_model_service.py
🚧 Files skipped from review as they are similar to previous changes (2)
- rag/flow/parser/parser.py
- rag/app/naive.py
Bring in main fixes (infiniflow#16765, infiniflow#16782). Resolve conflicts using resolve_model_config from main with dev user_id on LLMBundle. Fix get_model_type_by_name single-record handling. Co-authored-by: Cursor <[email protected]>
Summary
As title.