Pulastya0 commited on
Commit
430d263
·
verified ·
1 Parent(s): c88ab4c

Update agent_langchain.py

Browse files
Files changed (1) hide show
  1. agent_langchain.py +2 -2
agent_langchain.py CHANGED
@@ -66,13 +66,13 @@ def classify_ticket(text):
66
  # ==============================================================
67
  # 🧭 ROUTING FUNCTION (Space 2)
68
  # ==============================================================
69
- def call_routing(text, retries=3, delay=20):
70
  """Call Space 2 routing endpoint and get department only."""
71
  url = ROUTING_URL if ROUTING_URL else f"{SPACE_URL}/route"
72
 
73
  for attempt in range(retries):
74
  try:
75
- resp = requests.post(url, json={"text": text}, timeout=10)
76
  resp.raise_for_status()
77
  data = resp.json()
78
  return data.get("department", "General IT")
 
66
  # ==============================================================
67
  # 🧭 ROUTING FUNCTION (Space 2)
68
  # ==============================================================
69
+ def call_routing(text, retries=3, delay=5):
70
  """Call Space 2 routing endpoint and get department only."""
71
  url = ROUTING_URL if ROUTING_URL else f"{SPACE_URL}/route"
72
 
73
  for attempt in range(retries):
74
  try:
75
+ resp = requests.post(url, json={"text": text}, timeout=30)
76
  resp.raise_for_status()
77
  data = resp.json()
78
  return data.get("department", "General IT")