frabbani commited on
Commit
ddecc74
·
1 Parent(s): df053dd

Add graph based workflow ui filtering to agent_v2...........

Browse files
Files changed (2) hide show
  1. agent_v2.py +6 -0
  2. server.py +4 -0
agent_v2.py CHANGED
@@ -1092,6 +1092,12 @@ async def run_agent_v2(patient_id: str, question: str, skin_image_data: Optional
1092
  # Initialize state
1093
  state = AgentState(patient_id=patient_id, question=question, skin_image_data=skin_image_data)
1094
 
 
 
 
 
 
 
1095
  try:
1096
  # =====================================================================
1097
  # PHASE 1: DISCOVER
 
1092
  # Initialize state
1093
  state = AgentState(patient_id=patient_id, question=question, skin_image_data=skin_image_data)
1094
 
1095
+ # DEBUG: Log whether skin image was received
1096
+ if skin_image_data:
1097
+ print(f"[SKIN] Image data received: {len(skin_image_data)} chars")
1098
+ else:
1099
+ print(f"[SKIN] No image data received")
1100
+
1101
  try:
1102
  # =====================================================================
1103
  # PHASE 1: DISCOVER
server.py CHANGED
@@ -475,6 +475,10 @@ from agent_v2 import run_agent_v2
475
  async def agent_chat_endpoint(request: ChatRequest):
476
  async def generate():
477
  try:
 
 
 
 
478
  # Pass skin_image_data to agent if provided
479
  async for event in run_agent_v2(
480
  request.patient_id,
 
475
  async def agent_chat_endpoint(request: ChatRequest):
476
  async def generate():
477
  try:
478
+ # DEBUG: Log whether skin image was received
479
+ has_image = request.skin_image_data is not None and len(request.skin_image_data) > 0
480
+ print(f"[SERVER] Agent chat - question: '{request.message[:50]}', has_skin_image: {has_image}, image_len: {len(request.skin_image_data) if request.skin_image_data else 0}")
481
+
482
  # Pass skin_image_data to agent if provided
483
  async for event in run_agent_v2(
484
  request.patient_id,