Skip to content

phedone/event-driven-technical-test-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCaaS AI Processor - Technical Test

Overview

You will build a Contact Center as a Service (CCaaS) system that processes call data from external providers using an event-driven architecture. The system receives webhook notifications when calls are completed, processes them asynchronously using AI, and sends results back via callbacks.

Architecture

  • FastAPI web server with webhook endpoints
  • FastStream + Redis for event-driven message processing
  • AI Processing service for call transcription and summarization
  • Async workers for background processing

Getting Started

1. Setup Environment

I let you discover how the project is made to do the setup correctly

2. System Architecture

I let you discover the project and then we can talk a bit more about the system architecture

Your Tasks

Part 1: Complete the AI Processing

File: app/services/ai_processor.py

Implement the AIProcessor.process_call() method to:

  1. Download audio from recording_url
  2. Transcribe audio to text
  3. Generate summary from transcript
  4. Send results to callback_url as POST request

Key considerations:

  • It is important to have flexibility on how we want to do transcription and summarization (calling external API or internal API for example)
  • Handle errors gracefully
  • Make the system easily testable

Part 2: End-to-End Integration Test (15 min)

File: tests/test_e2e.py

Test the complete flow from webhook to callback:

Note: This requires Redis to be running. Consider using test fixtures for broker setup.

Testing Your Implementation E2E

Send test webhook:

curl -X POST http://localhost:8000/webhooks/call-completed \
  -H "Content-Type: application/json" \
  -d '{
    "call_id": "test-123",
    "provider": "twilio",
    "recording_url": "https://httpbin.org/delay/1",
    "callback_url": "https://httpbin.org/post"
  }'

Discussion Points

During the session, we'll discuss:

  • Design patterns for external service integration
  • Testing strategies for async/event-driven systems
  • Error handling and resilience patterns
  • Scaling considerations for AI processing workloads

Good luck! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published