Spaces:
Sleeping
Sleeping
File size: 746 Bytes
c01955c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import sys
import logging
from exception import MyException
from src.Agents.graphs.interview_graph_builder import chat_interviewer
class AiInterviewChat:
def __init__(self):
pass
async def chat_interviewer_ai(self, thread_id: str='1', time_remain: int=1, topic: str='machine learning', user_input: str='hello sir'):
logging.info(f"Entering chat_interviewer controller for thread_id: {thread_id}")
try:
res = await chat_interviewer(thread_id=thread_id, time_remain=time_remain, topic=topic, user_input=user_input)
logging.info("AI response received")
return {"ai_response": res['messages'][-1].content}
except Exception as e:
raise MyException(e, sys) |