mhattingpete commited on
Commit
efd0878
·
1 Parent(s): 487eeba

fixed bug with missing task_id

Browse files
Files changed (2) hide show
  1. agent.py +1 -1
  2. app.py +1 -1
agent.py CHANGED
@@ -26,7 +26,7 @@ class Agent:
26
  )
27
  logger.info("BasicAgent initialized.")
28
 
29
- def __call__(self, question: str, file_name: str) -> str:
30
  logger.info(
31
  f"Agent received question (first 50 chars): {question[:50]}..."
32
  )
 
26
  )
27
  logger.info("BasicAgent initialized.")
28
 
29
+ def __call__(self, question: str, task_id: str, file_name: str) -> str:
30
  logger.info(
31
  f"Agent received question (first 50 chars): {question[:50]}..."
32
  )
app.py CHANGED
@@ -69,7 +69,7 @@ async def _run_agent_async(
69
  loop = asyncio.get_running_loop()
70
  async with semaphore:
71
  answer = await loop.run_in_executor(
72
- None, agent, question, file_name
73
  ) # execute in default thread‑pool
74
  cache[str(task_id)] = answer
75
  return task_id, answer
 
69
  loop = asyncio.get_running_loop()
70
  async with semaphore:
71
  answer = await loop.run_in_executor(
72
+ None, agent, question, task_id, file_name
73
  ) # execute in default thread‑pool
74
  cache[str(task_id)] = answer
75
  return task_id, answer