Spaces:
Sleeping
Sleeping
Download python_backend/src/Agents/components/ai_interview_chat.py from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 746 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/Agents/components/ai_interview_chat.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/python_backend/src/Agents/components/ai_interview_chat.py
-
curl -L -o ai_interview_chat.py https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/Agents/components/ai_interview_chat.py
746 Bytes
| 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) |