Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,6 +53,7 @@ def priority_classification_agent(state: State) -> Command[Literal["escalation_c
|
|
| 53 |
)
|
| 54 |
#)
|
| 55 |
priority = llm.invoke(prompt).strip().lower()
|
|
|
|
| 56 |
|
| 57 |
# Ensure valid priority classification
|
| 58 |
if priority not in ["urgent", "critical", "normal"]:
|
|
@@ -83,11 +84,10 @@ def generate_response_agent(state: State) -> Dict[str, str]:
|
|
| 83 |
|
| 84 |
# Escalation classification agent
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
def escalation_classification_agent(state: State) -> Command[Literal["generate_response_agent"]]:
|
| 89 |
"""Classify whether escalation is needed based on priority."""
|
| 90 |
escalation_needed = state["priority"].lower() in ["urgent", "critical"]
|
|
|
|
| 91 |
return Command(update={"escalation_needed": escalation_needed}, goto="generate_response_agent")
|
| 92 |
|
| 93 |
|
|
|
|
| 53 |
)
|
| 54 |
#)
|
| 55 |
priority = llm.invoke(prompt).strip().lower()
|
| 56 |
+
print("priority": priority)
|
| 57 |
|
| 58 |
# Ensure valid priority classification
|
| 59 |
if priority not in ["urgent", "critical", "normal"]:
|
|
|
|
| 84 |
|
| 85 |
# Escalation classification agent
|
| 86 |
|
|
|
|
|
|
|
| 87 |
def escalation_classification_agent(state: State) -> Command[Literal["generate_response_agent"]]:
|
| 88 |
"""Classify whether escalation is needed based on priority."""
|
| 89 |
escalation_needed = state["priority"].lower() in ["urgent", "critical"]
|
| 90 |
+
print(f"Escalation Needed: {escalation_needed}, Priority: {state['priority']}") # Debugging escalation
|
| 91 |
return Command(update={"escalation_needed": escalation_needed}, goto="generate_response_agent")
|
| 92 |
|
| 93 |
|