fix(collections): Use correct file batch ID#1073
Conversation
📝 WalkthroughWalkthrough
ChangesVector batch ingestion
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
OpenAPI changes ⚪ No API surface changesNote This PR does not modify the API contract.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
backend/app/tests/crud/rag/test_open_ai.py (2)
72-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the self-evident comment.
assert_not_called()already expresses this expectation; retain comments only when they explain rationale. As per coding guidelines, “Write comments and docstrings to explain why something is done, not what the code already shows.”🤖 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 `@backend/app/tests/crud/rag/test_open_ai.py` at line 72, Remove the self-evident “list_files should not have been called on the happy path” comment near the assert_not_called() expectation in the test, leaving the assertion unchanged.Source: Coding guidelines
44-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd required type annotations to changed test signatures.
Annotate non-
selffixture parameters and return values consistently.
backend/app/tests/crud/rag/test_open_ai.py#L44-L44: annotatemock_client: MagicMock.backend/app/tests/crud/rag/test_open_ai.py#L75-L75: annotate injected fixtures and add-> None.backend/app/tests/crud/rag/test_open_ai.py#L106-L108: annotate injected fixtures and add-> None.backend/app/tests/crud/rag/test_open_ai.py#L122-L124: annotate injected fixtures and add-> None.🤖 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 `@backend/app/tests/crud/rag/test_open_ai.py` at line 44, Add the requested annotations in backend/app/tests/crud/rag/test_open_ai.py: type _wire_batch’s mock_client parameter as MagicMock, and annotate all non-self injected fixture parameters plus return values with -> None in the test functions at lines 75, 106-108, and 122-124. Apply the annotations consistently across all four affected sites.Source: Coding guidelines
🤖 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 `@backend/app/tests/crud/rag/test_open_ai.py`:
- Line 72: Remove the self-evident “list_files should not have been called on
the happy path” comment near the assert_not_called() expectation in the test,
leaving the assertion unchanged.
- Line 44: Add the requested annotations in
backend/app/tests/crud/rag/test_open_ai.py: type _wire_batch’s mock_client
parameter as MagicMock, and annotate all non-self injected fixture parameters
plus return values with -> None in the test functions at lines 75, 106-108, and
122-124. Apply the annotations consistently across all four affected sites.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 79f5c90e-9ea2-43f6-8dc9-ff715cb54c65
📒 Files selected for processing (6)
backend/app/crud/rag/open_ai.pybackend/app/tests/crud/rag/test_open_ai.pybackend/app/tests/services/collections/providers/test_openai_provider.pybackend/app/tests/utils/llm_provider.pybackend/app/tests/utils/openai.pydocs/wiki/modules/knowledge-base.md
Issue
Closes #1076
Summary
create()function when listing failed files.Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.
Original PR description
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Explain the motivation for making this change. What existing problem does the pull request solve?
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.