Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
d01b52d
1
Parent(s): 6cc0dee
backend stabilisation
Browse files- agents/nexus_master.py +0 -4
agents/nexus_master.py
CHANGED
|
@@ -277,13 +277,11 @@ async def nexus_initializer(state: NexusState) -> Dict[str, Any]:
|
|
| 277 |
return result
|
| 278 |
|
| 279 |
async def sync_ticket_context():
|
| 280 |
-
from agents.tools.nexus_tools import get_ticket_details_tool
|
| 281 |
t_id = state.get("ticket_id")
|
| 282 |
if not t_id:
|
| 283 |
# Proactive extraction: if user mentions a ticket-like ID (e.g. B42B9701)
|
| 284 |
ticket_match = re.search(r'\b([A-Z0-9]{6,12})\b', last_msg)
|
| 285 |
if ticket_match:
|
| 286 |
-
from agents.tools.nexus_tools import resolve_ticket_id
|
| 287 |
async with async_session_factory() as db:
|
| 288 |
t_obj = await resolve_ticket_id(db, ticket_match.group(1), ws_id, role=state.get("user_role", "customer_user"))
|
| 289 |
if t_obj:
|
|
@@ -665,10 +663,8 @@ async def nexus_executor(state: NexusState) -> Dict[str, Any]:
|
|
| 665 |
elif tool_name == "SIMILAR_INCIDENTS":
|
| 666 |
task_calls.append((call_id, similar_incident_finder(params.get("query"), ws_id, role=state["user_role"], user_id=state["user_id"])))
|
| 667 |
elif tool_name == "PROJECT_PULSE":
|
| 668 |
-
from agents.tools.nexus_tools import project_pulse_tool
|
| 669 |
task_calls.append((call_id, project_pulse_tool(params.get("project_name"), ws_id)))
|
| 670 |
elif tool_name == "SENTIMENT_CHECK":
|
| 671 |
-
from agents.tools.nexus_tools import sentiment_pulse_tool
|
| 672 |
task_calls.append((call_id, sentiment_pulse_tool(params.get("ticket_id"), ws_id)))
|
| 673 |
elif tool_name == "CREATE_TICKET":
|
| 674 |
task_calls.append((call_id, create_ticket_tool(
|
|
|
|
| 277 |
return result
|
| 278 |
|
| 279 |
async def sync_ticket_context():
|
|
|
|
| 280 |
t_id = state.get("ticket_id")
|
| 281 |
if not t_id:
|
| 282 |
# Proactive extraction: if user mentions a ticket-like ID (e.g. B42B9701)
|
| 283 |
ticket_match = re.search(r'\b([A-Z0-9]{6,12})\b', last_msg)
|
| 284 |
if ticket_match:
|
|
|
|
| 285 |
async with async_session_factory() as db:
|
| 286 |
t_obj = await resolve_ticket_id(db, ticket_match.group(1), ws_id, role=state.get("user_role", "customer_user"))
|
| 287 |
if t_obj:
|
|
|
|
| 663 |
elif tool_name == "SIMILAR_INCIDENTS":
|
| 664 |
task_calls.append((call_id, similar_incident_finder(params.get("query"), ws_id, role=state["user_role"], user_id=state["user_id"])))
|
| 665 |
elif tool_name == "PROJECT_PULSE":
|
|
|
|
| 666 |
task_calls.append((call_id, project_pulse_tool(params.get("project_name"), ws_id)))
|
| 667 |
elif tool_name == "SENTIMENT_CHECK":
|
|
|
|
| 668 |
task_calls.append((call_id, sentiment_pulse_tool(params.get("ticket_id"), ws_id)))
|
| 669 |
elif tool_name == "CREATE_TICKET":
|
| 670 |
task_calls.append((call_id, create_ticket_tool(
|