Spaces:
Sleeping
Sleeping
File size: 1,865 Bytes
0225ffc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | from pydantic import BaseModel, Field
from typing import List, Annotated, Optional
from langgraph.graph.message import add_messages
from langchain_core.messages import BaseMessage
class Skill(BaseModel):
score: int = Field(..., ge=0, le=10, description="Score between 0 and 10")
feedback: str = Field(..., description="Short justification/feedback for this score")
class SkillsBreakdown(BaseModel):
technicalKnowledge: Skill = Field(..., description="Technical knowledge evaluation")
communicationSkills: Skill = Field(..., description="Communication skills evaluation")
problemSolvingAbility: Skill = Field(..., description="Problem solving ability evaluation")
confidence: Skill = Field(..., description="Confidence evaluation")
clarityOfExplanation: Skill = Field(..., description="Clarity of explanation evaluation")
class Performance(BaseModel):
overallScore: int = Field(..., ge=0, le=10, description="Overall performance score")
verdict: str = Field(..., description="Hire decision", pattern="^(hire|maybe|reject)$")
summaryFeedback: str
skills: SkillsBreakdown = Field(..., description="Detailed breakdown of candidate skills")
strengths: List[str] = Field(default_factory=list)
weaknesses: List[str] = Field(default_factory=list)
practiceRecommendations: List[str] = Field(default_factory=list)
studyRecommendations: List[str] = Field(default_factory=list)
lowPriorityOrAvoid: List[str] = Field(default_factory=list)
confidenceLevel: int = Field(..., ge=0, le=10, description="Overall confidence level")
class InterviewState(BaseModel):
messages: Annotated[List[BaseMessage], add_messages]
topic: Optional[str] = None
time_remaining: int # in seconds
questions_generated: bool = False
questions: Optional[str] = None
performance: Optional[Performance] = None |