-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.py
More file actions
55 lines (48 loc) · 1.98 KB
/
Copy pathstate.py
File metadata and controls
55 lines (48 loc) · 1.98 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from typing import TypedDict, Optional
class PipelineState(TypedDict):
"""
Single state object that flows through every LangGraph node.
Each node reads what it needs and writes its outputs back here.
"""
# ── Inputs ──────────────────────────────────────────────
jd_text: str # raw job description text
pdf_bytes: bytes # raw PDF bytes of the resume
# ── Parser output ────────────────────────────────────────
resume_json: Optional[dict]
# Shape:
# {
# "name": str,
# "skills": [str],
# "experience_years": int,
# "projects": [{"title": str, "description": str, "tech": [str]}],
# "links": {"github": str | None, "linkedin": str | None},
# "raw_text": str
# }
# ── Similarity node output ───────────────────────────────
pinecone_matches: Optional[list]
# Shape per item:
# {
# "resume_chunk": str,
# "jd_match": str,
# "cosine": float # 0.0 – 1.0
# }
# ── Scorer node output ───────────────────────────────────
score_result: Optional[dict]
# Shape:
# {
# "exact_score": int,
# "similarity_score": int,
# "achievement_score": int,
# "ownership_score": int,
# "overall": int,
# "reasoning": {
# "exact": str,
# "similarity": str,
# "achievement": str,
# "ownership": str
# },
# "red_flags": [str],
# "green_flags": [str]
# }
# ── Final report ─────────────────────────────────────────
final_report: Optional[dict]