Spaces:
Runtime error
Runtime error
Update app.py
Browse files45 unmodified lines46474849505152535455565725 unmodified lines83848586878845 unmodified linesprompt = (f"You are a support assistant. Based on the severity, classify the issues "f"into one of the following categories:\n"f"1. Urgent: Issues causing significant business impact (e.g., payment gateway failure).\n"f"2. Critical: Issues needing immediate attention but with manageable impact.\n"f"3. Normal: Issues that can wait for routine handling.\n\n"f"Issue: {state['issue_description']}")#)priority = llm.invoke(prompt).strip().lower()25 unmodified linesreturn {"response": response, "escalation": escalation}# Escalation classification agentdef escalation_classification_agent(state: State) -> Command[Literal["generate_response_agent"]]:"""Classify whether escalation is needed based on priority."""escalation_needed = state["priority"].lower() in ["urgent", "critical"]45 unmodified lines464748495051525354555625 unmodified lines82838485868788899045 unmodified linesprompt = (f"You are a support assistant. Based on the severity, classify the issues "f"into one of the following categories:\n"f"1. Urgent: Issues causing significant business impact (e.g., payment gateway failure, server down or issues that can not wait as per company's well being).\n"f"2. Critical: Issues needing immediate attention but with manageable impact.\n"f"3. Normal: Issues that can wait for routine handling.\n\n"f"Issue: {state['issue_description']}")#)priority = llm.invoke(prompt).strip().lower()25 unmodified linesreturn {"response": response, "escalation": escalation}# Escalation classification agentdef escalation_classification_agent(state: State) -> Command[Literal["generate_response_agent"]]:"""Classify whether escalation is needed based on priority."""escalation_needed = state["priority"].lower() in ["urgent", "critical"]
app.py+4-2