File size: 560 Bytes
c01955c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import fastapi
from src.Agents.pipelines.InterviewPerformance_pipeline import InterviewPerformancePipeline
import logging
import sys
from exception import MyException

router = fastapi.APIRouter()

@router.get("/performance/{thread_id}")
async def performance(thread_id: str):
    logging.info(f"Entering performance route for thread {thread_id} (async)")
    try:
        pipeline = InterviewPerformancePipeline()
        result = await pipeline.initiate(thread_id=thread_id)
        return result
    except Exception as e:
        raise MyException(e, sys)