-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
37 lines (27 loc) · 900 Bytes
/
Copy pathmain.py
File metadata and controls
37 lines (27 loc) · 900 Bytes
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
from graph.workflow import workflow
from database.db import init_db, save_ticket
from memory.chat_memory import save_chat
init_db()
print("\n=== Multi-Agent Customer Support System ===\n")
while True:
ticket = input("Enter Support Ticket: ")
if ticket.lower() == "exit":
break
result = workflow.invoke({
"ticket": ticket
})
print("\n========== RESULT ==========")
print(f"Category : {result['category']}")
print(f"Sentiment : {result['sentiment']}")
print(f"Escalation : {result['escalation']}")
print("\nResponse:\n")
print(result["response"])
save_chat(ticket, result["response"])
save_ticket(
ticket=ticket,
category=result["category"],
sentiment=result["sentiment"],
response=result["response"],
escalation=result["escalation"]
)
print("\n============================\n")