Skip to content

feat(didi): BigQuery fixes, ElevenLabs provider, no-call blocklist, agent prompts, full template seeding - #21

Open
DZDasherKTB wants to merge 8 commits into
theapprenticeproject:onboarding_2026from
DZDasherKTB:onboarding_2026
Open

feat(didi): BigQuery fixes, ElevenLabs provider, no-call blocklist, agent prompts, full template seeding#21
DZDasherKTB wants to merge 8 commits into
theapprenticeproject:onboarding_2026from
DZDasherKTB:onboarding_2026

Conversation

@DZDasherKTB

Copy link
Copy Markdown

Hey! Here are all the changes since PR #20 got merged.

BigQuery Sync Fixes

Fixed the field name casing for sp_assigment_id which was causing last_assignment_name to come back null for every student. Added filtering for @results template garbage and reset values that Glific writes when a flow does not complete. Fixed the BigQuery scope from readonly to full since running a query job needs more than just read access.

ElevenLabs Provider

Added ElevenLabs as a second voice call provider alongside Vocallabs. Campaigns now have a provider dropdown and the background worker routes automatically. ElevenLabs uses a single API call with dynamic variables injected directly which is simpler than the Vocallabs two step flow. Added ElevenLabsSettings singleton doctype for credentials and per language agent mapping, same pattern as BigQuerySettings.

No-call Blocklist

Added a VoiceCallBlocklist doctype where admin can add phone numbers that should never be called. The check happens at call initiation time for both providers, not just at queue generation. Also added cross-campaign daily deduplication so if a student was already called today by any campaign, subsequent campaigns skip them automatically. Both checks write an audit trail to VoiceCallHistory.

Recording Pull

Added fetch_recordings() on VoiceCallCampaign that pulls recording URLs from the provider after a campaign completes and stores them on each VoiceCallHistory row. Added vocallabs_call_id, recording_url, and duration_seconds fields to VoiceCallHistory.

Agent Prompts

Wrote full updated Vocallabs agent prompts for all four languages stored in docs/agent_prompts/. All four have situation based branching for all 8 nudge types, context quality filtering so the agent ignores emoji and button tap noise from Glific, grade group handling for younger vs older students, and call attempt handling for follow up calls. Waiting on approval before pushing to the Vocallabs dashboard.

Full Template Seeding

seed_language_templates.py was previously a stub. Replaced with full seeding logic that automatically creates all 24 ParentCallConfig records for English, Marathi and Punjabi across all 8 nudge types on bench migrate, and links all 4 languages in the VoiceNudgeLanguageTemplate child table on each VoiceNudgeConfig. Safe to run on servers already set up manually as it skips existing records.

nithun and others added 8 commits August 5, 2026 13:05
- ElevenLabs integration with campaign-level provider switch (Vocallabs/ElevenLabs)
- ElevenLabsSettings singleton doctype for credentials and per-language agents
- VoiceCallBlocklist doctype - blocks numbers at call time with audit trail
- bigquery_sync: scope fix (readonly to full), sp_assigment_id casing fix, filter @results noise
- hooks.py: Mon-Sat BigQuery sync schedule
Full situation-based prompts for English, Hindi, Marathi, Punjabi.
Each has 8 nudge type branches, context quality filtering, grade group
handling, call attempt handling, and all guardrails. Ready to paste
into Vocallabs dashboard pending Manu approval.
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.

2 participants