Update src/agents/db_executor/db_executor.py (#2)
Browse files- Update src/agents/db_executor/db_executor.py (4aea5afe5798e66ef823976068b38410e4e65361)
Co-authored-by: Sebastian Wefers <Basti-1995@users.noreply.huggingface.co>
src/agents/db_executor/db_executor.py
CHANGED
|
@@ -11,6 +11,7 @@ from langchain_core.tools import tool
|
|
| 11 |
from typing import Dict, Any
|
| 12 |
from src.prompts import get_prompt
|
| 13 |
from src.database.candidates import evaluate_cv_screening_decision
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
SYSTEM_PROMPT = get_prompt(
|
|
@@ -40,6 +41,9 @@ def db_executor(query: str) -> str:
|
|
| 40 |
"VoiceScreeningResult": VoiceScreeningResult,
|
| 41 |
"InterviewScheduling": InterviewScheduling,
|
| 42 |
"FinalDecision": FinalDecision,
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 44 |
|
| 45 |
try:
|
|
@@ -77,19 +81,3 @@ def db_executor(query: str) -> str:
|
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
-
if __name__ == "__main__":
|
| 81 |
-
from rich.console import Console
|
| 82 |
-
from rich.panel import Panel
|
| 83 |
-
|
| 84 |
-
console = Console()
|
| 85 |
-
query = "Fetch all candidates and their status."
|
| 86 |
-
|
| 87 |
-
console.rule("[bold magenta]DB Executor Test Run[/bold magenta]")
|
| 88 |
-
console.print(f"[cyan]Query:[/] {query}\n")
|
| 89 |
-
|
| 90 |
-
result = db_executor(query)
|
| 91 |
-
|
| 92 |
-
# 🧠 Show model result nicely
|
| 93 |
-
console.print(Panel.fit(result, title="🧠 Model Output", border_style="blue"))
|
| 94 |
-
|
| 95 |
-
console.rule("[bold green]End of Execution[/bold green]")
|
|
|
|
| 11 |
from typing import Dict, Any
|
| 12 |
from src.prompts import get_prompt
|
| 13 |
from src.database.candidates import evaluate_cv_screening_decision
|
| 14 |
+
from src.state.candidate import CandidateStatus, InterviewStatus, DecisionStatus
|
| 15 |
|
| 16 |
|
| 17 |
SYSTEM_PROMPT = get_prompt(
|
|
|
|
| 41 |
"VoiceScreeningResult": VoiceScreeningResult,
|
| 42 |
"InterviewScheduling": InterviewScheduling,
|
| 43 |
"FinalDecision": FinalDecision,
|
| 44 |
+
"CandidateStatus": CandidateStatus,
|
| 45 |
+
"InterviewStatus": InterviewStatus,
|
| 46 |
+
"DecisionStatus": DecisionStatus,
|
| 47 |
}
|
| 48 |
|
| 49 |
try:
|
|
|
|
| 81 |
|
| 82 |
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|