Fixes/ap tasks - #36
Conversation
…proved logging. Introduce media_creation utility file.
…rove clarity and reduce verbosity
Adding openai functionality for objectives
…-mohini-service into hotfix/parallel-action-generation
…ration Hotfix/parallel action generation
Adding company bot filter on media admin panel
Hotfix/obj fixes
…-mohini-service into hotfix/obj_fixes
- Introduced PostProcessingView to handle post-processing logic. - Added new post-processing template for the Story model. - Updated admin change list to include a button for post-processing. - Refactored imports in various files for consistency.
Hotfix/obj fixes
- Added .python-version file specifying Python version 3.12. - Created pyproject.toml for project metadata and dependencies. - Updated requirement.txt to remove deprecated packages and ensure compatibility with new dependencies. - Introduced uv.lock for dependency resolution tracking.
…-mohini-service into features/dep-manager
- Added new dependencies: beautifulsoup4, coreapi, coreschema, pydub, and others. - Updated existing dependencies to their latest versions. - Enhanced the uv.lock file to reflect the new package additions and versions. - Introduced a new development dependency group for ruff.
- Modified installation instructions to include the `uv` dependency manager. - Updated virtual environment creation steps to utilize `uv`. - Renumbered sections for clarity and consistency. - Consolidated steps related to project dependencies and environment setup.
…tive challenge processing and new HTML elements
…rocessor, adding S3 upload functionality and flow filtering
Features/dep manager
…that we dont have to manually add each field name whenever updating the model
…-mohini-service into hotfix/obj_fixes
Add request_timeout to Bhashini voice provider defaults (ASR: 60s, NMT/TTS: 30s). Align AI4Bharat translation default to 30s. Raise Sarvam TTS default to 60s. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…oint Hardcoded 60s timeouts replaced with other_params.request_timeout so per-bot tuning is possible without code changes. STT: endpoint /stt -> /transcribe, response key transcription -> text to match updated local model API contract. Also adds SHIKSHALOKAM defaults block to voice_provider_defaults.
Add a new module for state categorization based on location text, including language detection and translation to English. Implement helper functions for text normalization, pattern matching, and organization matching. This module enhances the chatbot's ability to categorize discussions based on user input locations.
One-shot repair script for chaupal chats where transliteration previously errored. Queries by error string in translated_message, retries via existing transliterate_text util, and saves on success.
…nfig Features/request timeout config
PPPI Dashboard - Add Set 1 and Set 2 story creation support
Added self host provider and celery config update
feat: add Tamil language support
…lity-v2 feat: add configurable authentication, Bedrock and Redis configuration
…lity-v2 Fix ValidationException handling for Bedrock state machine bots
…ervice into fixes/ap-tasks
📝 WalkthroughWalkthroughThe regeneration command adds an optional language override, threads it through route processing, resolves session language from ChangesReport regeneration language handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Command
participant handle
participant _process_route
participant ChatSession
participant _story_bot_can_transliterate
participant StoryBotVoice
participant create_story_object
Command->>handle: receive --language
handle->>_process_route: pass language_override
_process_route->>ChatSession: resolve fallback language
_process_route->>_story_bot_can_transliterate: check target language
_story_bot_can_transliterate->>StoryBotVoice: inspect Transliterate Voice
_story_bot_can_transliterate-->>_process_route: return support status
_process_route->>create_story_object: regenerate supported session
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@chatbot/management/commands/regenerate_transliterated_reports.py`:
- Around line 83-109: Resolve every remaining Git conflict marker in the
management command, including the documented --language option and the related
implementation blocks around the command’s argument parsing, language selection,
transliteration guard/cache, processing, and reporting logic. Preserve both the
language override flow and the transliteration guard/cache behavior, then verify
no literal conflict markers remain so the module imports as valid Python.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7939721c-7ebf-4553-b934-dd5702b196a3
📒 Files selected for processing (1)
chatbot/management/commands/regenerate_transliterated_reports.py
| <<<<<<< HEAD | ||
| ======= | ||
| --language | ||
| Override the language passed to report regeneration. If omitted, taken | ||
| from the existing Story.language, then the ChatSession.language. | ||
| >>>>>>> upstream/release-2.2.0 | ||
| --bot-profile-id | ||
| Profile id used as the bot sender (its messages are excluded from | ||
| re-transliteration). Default 1. | ||
| --skip-transliterate Skip step 1 (only regenerate reports). | ||
| --skip-report Skip step 2 (only re-transliterate chats). | ||
| --limit Process at most N sessions (0 = no limit). | ||
| --dry-run Report counts only; no DB writes, no report calls. | ||
| <<<<<<< HEAD | ||
|
|
||
| Report language | ||
| --------------- | ||
| The report is always regenerated in the session's own language -- the same value | ||
| ``/api/end-story/`` passes, so there is no --language override. ``Story.other_params`` | ||
| is nevertheless stored in English: ``save_story()`` transliterates the LLM output | ||
| back to English using a Transliterate ``Voice`` on the *story* bot. If that Voice is | ||
| missing, ``transliterate_to_english_if_needed()`` silently keeps the original script, | ||
| ``other_params`` ends up in Devanagari, and dashboards reading | ||
| ``other_params->>'location'`` stop matching the story. This command therefore refuses | ||
| to regenerate such sessions instead of corrupting them. | ||
| ======= | ||
| >>>>>>> upstream/release-2.2.0 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Resolve the remaining Git conflict markers.
Line 83 and the related blocks at Lines 128-140, 231-234, 273-281, 304-308, 321-325, 455-459, 475-487, and 631-680 contain literal <<<<<<<, =======, and >>>>>>> markers. Python cannot import this management command until every block is resolved; preserve both the language override flow and the transliteration guard/cache as intended.
🤖 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 `@chatbot/management/commands/regenerate_transliterated_reports.py` around
lines 83 - 109, Resolve every remaining Git conflict marker in the management
command, including the documented --language option and the related
implementation blocks around the command’s argument parsing, language selection,
transliteration guard/cache, processing, and reporting logic. Preserve both the
language override flow and the transliteration guard/cache behavior, then verify
no literal conflict markers remain so the module imports as valid Python.
Source: Linters/SAST tools
Summary by CodeRabbit
New Features
Bug Fixes