Skip to content

Fixes/ap tasks - #36

Open
Anujkumar7 wants to merge 1643 commits into
ELEVATE-Project:release-2.2.0from
Anujkumar7:fixes/ap-tasks
Open

Fixes/ap tasks#36
Anujkumar7 wants to merge 1643 commits into
ELEVATE-Project:release-2.2.0from
Anujkumar7:fixes/ap-tasks

Conversation

@Anujkumar7

@Anujkumar7 Anujkumar7 commented Jul 30, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added an optional language override for report regeneration.
    • Updated command guidance to explain language selection and safety behavior.
  • Bug Fixes

    • Regeneration now skips sessions when the required transliteration voice is unavailable, preventing incorrectly localized story data.
    • Language selection now consistently uses the session’s configured language, defaulting to English.

themohitbharti and others added 30 commits January 28, 2026 13:45
…proved logging. Introduce media_creation utility file.
Adding openai functionality for objectives
Adding company bot filter on media admin panel
- 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.
- 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.
- 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
…that we dont have to manually add each field name whenever updating the model
VishnuKrishnathu and others added 26 commits June 11, 2026 10:16
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.
PPPI Dashboard - Add Set 1 and Set 2 story creation support
Added self host provider and celery config update
…lity-v2

feat: add configurable authentication, Bedrock and Redis configuration
…lity-v2

Fix ValidationException handling for Bedrock state machine bots
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The regeneration command adds an optional language override, threads it through route processing, resolves session language from ChatSession, and skips Step 2 regeneration when the story bot lacks a Transliterate Voice for the target language.

Changes

Report regeneration language handling

Layer / File(s) Summary
Language override flow
chatbot/management/commands/regenerate_transliterated_reports.py
The command documents and accepts --language, passes the value through handle() and _process_route(), and prioritizes it during Step 2 language resolution.
Story-bot transliteration validation
chatbot/management/commands/regenerate_transliterated_reports.py
Step 2 checks cached story-bot Transliterate Voice support, skips unsupported sessions as failures, and resolves fallback language directly from ChatSession with "en" as the default.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: vishnukrishnathu

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague and does not describe the specific change in this PR. Rename it to mention the main change, e.g. report regeneration language override and transliteration safety checks.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Anujkumar7

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between aa10d4b and 0cfa18e.

📒 Files selected for processing (1)
  • chatbot/management/commands/regenerate_transliterated_reports.py

Comment on lines +83 to +109
<<<<<<< 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants